Skip to content
Snippets Groups Projects
Unverified Commit 6ede7a05 authored by Przemek Rzad's avatar Przemek Rzad Committed by GitHub
Browse files

Add Dockerfiles to the templates (#4637)

As requested
[here](https://github.com/paritytech/polkadot-sdk/issues/3155#issuecomment-2126934939).

The Dockerfiles are inspired by [this
one](https://github.com/paritytech/polkadot-sdk/blob/aa32faae/docker/dockerfiles/polkadot/polkadot_builder.Dockerfile).
parent dfb01aaa
No related merge requests found
Pipeline #479930 waiting for manual action with stages
in 27 minutes and 33 seconds
target/
Dockerfile
.dockerignore
FROM docker.io/paritytech/ci-unified:latest as builder
WORKDIR /polkadot
COPY . /polkadot
RUN cargo fetch
RUN cargo build --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"]
target/
Dockerfile
.dockerignore
FROM docker.io/paritytech/ci-unified:latest as builder
WORKDIR /polkadot
COPY . /polkadot
RUN cargo fetch
RUN cargo build --locked --release
FROM docker.io/parity/base-bin:latest
COPY --from=builder /polkadot/target/release/parachain-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/parachain-template-node --version
USER polkadot
EXPOSE 30333 9933 9944 9615
VOLUME ["/data"]
ENTRYPOINT ["/usr/local/bin/parachain-template-node"]
target/
Dockerfile
.dockerignore
FROM docker.io/paritytech/ci-unified:latest as builder
WORKDIR /polkadot
COPY . /polkadot
RUN cargo fetch
RUN cargo build --locked --release
FROM docker.io/parity/base-bin:latest
COPY --from=builder /polkadot/target/release/solochain-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/solochain-template-node --version
USER polkadot
EXPOSE 30333 9933 9944 9615
VOLUME ["/data"]
ENTRYPOINT ["/usr/local/bin/solochain-template-node"]
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment