Files
pezkuwi-telemetry/backend/Dockerfile
T
Chevdor 615feb2af0 Better docker image for the backend (#245)
* 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>
2020-05-27 09:08:40 +02:00

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"]