use alpine

This commit is contained in:
Martin Pugh
2021-03-26 19:52:10 +01:00
parent 6ce0236727
commit 9e8ce96fec
+3 -7
View File
@@ -1,15 +1,11 @@
#### BUILDER IMAGE -- quite big one ####
FROM paritytech/musl-ci-linux:latest as builder
LABEL maintainer="Parity Technologies"
LABEL description="Polkadot Telemetry backend builder image"
FROM rust:alpine as builder
ARG PROFILE=release
WORKDIR /app
COPY . .
RUN cargo build --${PROFILE} --bins --target x86_64-unknown-linux-musl
RUN apk add musl-dev openssl-dev; cargo build --${PROFILE} --bins
# MAIN IMAGE FOR PEOPLE TO PULL --- small one#
FROM scratch
@@ -20,7 +16,7 @@ ARG PROFILE=release
WORKDIR /usr/local/bin
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /app/target/x86_64-unknown-linux-musl/$PROFILE/telemetry /usr/local/bin
COPY --from=builder /app/target/$PROFILE/telemetry /usr/local/bin
EXPOSE 8000