mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-04-22 21:58:04 +00:00
615feb2af0
* Ignore vscode settings * Add Dockerfile for the backend * Shrink the docker image for the backend a little more - fix some doc - switch the rust static builder base image to nightly - switch 2 stage base image - remove version label * Switch second stage base image to scratch * Switch to the in-house base image * Update README.md Co-authored-by: Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com>
27 lines
656 B
Docker
27 lines
656 B
Docker
#### BUILDER IMAGE -- quite big one ####
|
|
FROM paritytech/musl-ci-linux as builder
|
|
LABEL maintainer="Daniel Maricic daniel@woss.io"
|
|
LABEL description="Polkadot Telemetry backend builder image"
|
|
|
|
ARG PROFILE=release
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
RUN cargo build --${PROFILE} --bins --target x86_64-unknown-linux-musl
|
|
|
|
|
|
# MAIN IMAGE FOR PEOPLE TO PULL --- small one#
|
|
FROM scratch
|
|
LABEL maintainer="Daniel Maricic daniel@woss.io"
|
|
LABEL description="Polkadot Telemetry backend, static build"
|
|
|
|
ARG PROFILE=release
|
|
WORKDIR /usr/local/bin
|
|
|
|
COPY --from=builder /app/target/x86_64-unknown-linux-musl/$PROFILE/telemetry /usr/local/bin
|
|
|
|
EXPOSE 8000
|
|
|
|
ENTRYPOINT ["telemetry"]
|