This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #9765
- Loading branch information
Showing
4 changed files
with
46 additions
and
30 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# This is the build stage for Polkadot. Here we create the binary in a temporary image. | ||
FROM docker.io/paritytech/ci-linux:production as builder | ||
|
||
ARG PROFILE=release | ||
|
||
WORKDIR /polkadot | ||
|
||
COPY . /polkadot | ||
|
||
RUN cargo build --locked --$PROFILE | ||
|
||
|
||
# This is the 2nd stage: a very small image where we copy the Polkadot binary." | ||
FROM docker.io/library/ubuntu:20.04 | ||
|
||
LABEL description="Multistage Docker image for Polkadot: a platform for web3" \ | ||
io.parity.image.type="builder" \ | ||
io.parity.image.authors="[email protected], [email protected]" \ | ||
io.parity.image.vendor="Parity Technologies" \ | ||
io.parity.image.description="Polkadot: a platform for web3" \ | ||
io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/docker/Dockerfile" \ | ||
io.parity.image.documentation="https://github.com/paritytech/polkadot/" | ||
|
||
ARG PROFILE=release | ||
|
||
COPY --from=builder /polkadot/target/$PROFILE/polkadot /usr/local/bin | ||
|
||
RUN useradd -m -u 1000 -U -s /bin/sh -d /polkadot polkadot && \ | ||
mkdir -p /data /polkadot/.local/share && \ | ||
chown -R polkadot:polkadot /data && \ | ||
ln -s /data /polkadot/.local/share/polkadot && \ | ||
rm -rf /usr/bin /usr/sbin | ||
|
||
USER polkadot | ||
|
||
# check if executable works in this container | ||
RUN /usr/bin/polkadot --version | ||
|
||
EXPOSE 30333 9933 9944 9615 | ||
VOLUME ["/polkadot"] | ||
|
||
ENTRYPOINT ["/usr/local/bin/polkadot"] |