Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch away from using MUSL builds #326

Merged
merged 2 commits into from
Mar 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
#### 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 paritytech/ci-linux:production as builder

ARG PROFILE=release
WORKDIR /app

COPY . .

RUN cargo build --${PROFILE} --bins --target x86_64-unknown-linux-musl

RUN cargo build --${PROFILE} --bins

# MAIN IMAGE FOR PEOPLE TO PULL --- small one#
FROM scratch
FROM debian:buster-slim
LABEL maintainer="Parity Technologies"
LABEL description="Polkadot Telemetry backend, static build"

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
RUN apt-get -y update && apt-get -y install openssl && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/

EXPOSE 8000

Expand Down