This repository was archived by the owner on Nov 15, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -15,23 +15,21 @@ LABEL description="Multistage Docker image for Substrate: a platform for web3" \
1515 io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/docker/substrate_builder.Dockerfile" \
1616 io.parity.image.documentation="https://github.com/paritytech/polkadot/"
1717
18- RUN useradd -m -u 1000 -U -s /bin/sh -d /substrate substrate && \
19- mkdir -p /data /substrate/.local/share/substrate && \
20- chown -R substrate:substrate /data && \
21- ln -s /data /substrate/.local/share/substrate
22-
2318COPY --from=builder /substrate/target/release/substrate /usr/local/bin
2419COPY --from=builder /substrate/target/release/subkey /usr/local/bin
2520COPY --from=builder /substrate/target/release/node-template /usr/local/bin
2621COPY --from=builder /substrate/target/release/chain-spec-builder /usr/local/bin
2722
23+ RUN useradd -m -u 1000 -U -s /bin/sh -d /substrate substrate && \
24+ mkdir -p /data /substrate/.local/share/substrate && \
25+ chown -R substrate:substrate /data && \
26+ ln -s /data /substrate/.local/share/substrate && \
27+ # unclutter and minimize the attack surface
28+ rm -rf /usr/bin /usr/sbin && \
2829# Sanity checks
29- RUN ldd /usr/local/bin/substrate && \
30+ ldd /usr/local/bin/substrate && \
3031 /usr/local/bin/substrate --version
3132
32- # Remove whatever not required
33- RUN rm -rf /usr/bin /usr/sbin
34-
3533USER substrate
3634EXPOSE 30333 9933 9944 9615
3735VOLUME ["/data" ]
You can’t perform that action at this time.
0 commit comments