51 lines
1.5 KiB
Docker
51 lines
1.5 KiB
Docker
FROM debian:bullseye-slim
|
|
|
|
# metadata
|
|
ARG VCS_REF
|
|
ARG BUILD_DATE
|
|
ARG IMAGE_NAME
|
|
|
|
LABEL io.parity.image.authors="devops-team@parity.io" \
|
|
io.parity.image.vendor="Parity Technologies" \
|
|
io.parity.image.title="${IMAGE_NAME}" \
|
|
io.parity.image.description="Malus - the nemesis of polkadot" \
|
|
io.parity.image.source="https://github.com/pezkuwichain/pezkuwichain-sdk/blob/${VCS_REF}/docker/dockerfiles/malus_injected.Dockerfile" \
|
|
io.parity.image.revision="${VCS_REF}" \
|
|
io.parity.image.created="${BUILD_DATE}" \
|
|
io.parity.image.documentation="https://github.com/pezkuwichain/pezkuwichain-sdk/"
|
|
|
|
# show backtraces
|
|
ENV RUST_BACKTRACE 1
|
|
|
|
# install tools and dependencies
|
|
RUN apt-get update && \
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
|
ca-certificates \
|
|
curl \
|
|
libssl1.1 \
|
|
tini && \
|
|
# apt cleanup
|
|
apt-get autoremove -y && \
|
|
apt-get clean && \
|
|
find /var/lib/apt/lists/ -type f -not -name lock -delete; \
|
|
# add user
|
|
groupadd --gid 10000 nonroot && \
|
|
useradd --home-dir /home/nonroot \
|
|
--create-home \
|
|
--shell /bin/bash \
|
|
--gid nonroot \
|
|
--groups nonroot \
|
|
--uid 10000 nonroot
|
|
|
|
|
|
# add adder-collator binary to docker image
|
|
COPY ./artifacts/malus ./artifacts/polkadot-execute-worker ./artifacts/polkadot-prepare-worker /usr/local/bin
|
|
|
|
USER nonroot
|
|
|
|
# check if executable works in this container
|
|
RUN /usr/local/bin/malus --version
|
|
|
|
# Tini allows us to avoid several Docker edge cases, see https://github.com/krallin/tini.
|
|
ENTRYPOINT ["tini", "--", "/bin/bash"]
|