mirror of
https://github.com/pezkuwichain/pez-minimal-template.git
synced 2026-04-21 22:38:00 +00:00
a76e4bf0ed
This synchronizes the template to the stable2412 branch. --------- Signed-off-by: Iulian Barbu <iulian.barbu@parity.io> Co-authored-by: iulianbarbu <14218860+iulianbarbu@users.noreply.github.com> Co-authored-by: Iulian Barbu <iulian.barbu@parity.io>
29 lines
769 B
Docker
29 lines
769 B
Docker
FROM docker.io/paritytech/ci-unified:latest as builder
|
|
|
|
WORKDIR /polkadot
|
|
COPY . /polkadot
|
|
|
|
RUN cargo fetch
|
|
RUN cargo build --workspace --locked --release
|
|
|
|
FROM docker.io/parity/base-bin:latest
|
|
|
|
COPY --from=builder /polkadot/target/release/minimal-template-node /usr/local/bin
|
|
|
|
USER root
|
|
RUN useradd -m -u 1001 -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 && \
|
|
# unclutter and minimize the attack surface
|
|
rm -rf /usr/bin /usr/sbin && \
|
|
# check if executable works in this container
|
|
/usr/local/bin/minimal-template-node --version
|
|
|
|
USER polkadot
|
|
|
|
EXPOSE 30333 9933 9944 9615
|
|
VOLUME ["/data"]
|
|
|
|
ENTRYPOINT ["/usr/local/bin/minimal-template-node"]
|