Files
pez-minimal-template/Dockerfile
T
paritytech-polkadotsdk-templatebot[bot] a76e4bf0ed Update the minimal template to stable2412 (#21)
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>
2025-02-20 15:29:47 +02:00

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"]