Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
simplified polkadot_builder.Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
alvicsam committed Sep 24, 2021
1 parent 1c4d3a9 commit 2e74764
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions scripts/docker/polkadot/polkadot_builder.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,18 @@
FROM docker.io/paritytech/ci-linux:production as builder
LABEL io.parity.image.authors="devops-team@parity.io" \
io.parity.image.vendor="Parity Technologies" \
io.parity.image.title="builder" \
io.parity.image.description="This is the build stage for Polkadot. Here we create the binary." \
io.parity.image.source="https://github.com/paritytech/polkadot/blob/master/scripts/docker/polkadot/polkadot_builder.Dockerfile" \
io.parity.image.documentation="https://github.com/paritytech/polkadot/scripts/docker/polkadot/README.md"

ARG PROFILE=release
LABEL io.parity.image.description="This is the build stage for Polkadot. Here we create the binary."

WORKDIR /polkadot

COPY . /polkadot

RUN cargo build --$PROFILE --locked
RUN cargo build --release --locked

# ===== SECOND STAGE ======

FROM docker.io/library/ubuntu:20.04
LABEL io.parity.image.authors="devops-team@parity.io" \
io.parity.image.vendor="Parity Technologies" \
io.parity.image.title="builder" \
io.parity.image.description="Polkadot: a platform for web3. This is a self-buit multistage image." \
io.parity.image.source="https://github.com/paritytech/polkadot/blob/master/scripts/docker/polkadot/polkadot_builder.Dockerfile" \
io.parity.image.documentation="https://github.com/paritytech/polkadot/scripts/docker/polkadot/README.md"

ARG PROFILE=release
COPY --from=builder /polkadot/target/$PROFILE/polkadot /usr/local/bin
LABEL io.parity.image.description="Polkadot: a platform for web3. This is a self-buit multistage image."

COPY --from=builder /polkadot/target/release/polkadot /usr/local/bin

RUN useradd -m -u 1000 -U -s /bin/sh -d /polkadot polkadot && \
mkdir -p /polkadot/.local/share && \
Expand Down

0 comments on commit 2e74764

Please sign in to comment.