2019-02-12 20:52:30 +01:00
|
|
|
FROM ubuntu:xenial
|
2018-08-26 00:44:08 +02:00
|
|
|
|
2019-06-11 20:56:03 +02:00
|
|
|
# metadata
|
|
|
|
ARG VCS_REF
|
|
|
|
ARG BUILD_DATE
|
|
|
|
|
2020-09-22 14:53:52 +02:00
|
|
|
LABEL openethereum.image.authors="devops-team@parity.io" \
|
|
|
|
openethereum.image.vendor="OpenEthereum project" \
|
|
|
|
openethereum.image.title="openethereum/openethereum" \
|
|
|
|
openethereum.image.description="Fast and feature-rich multi-network Ethereum client." \
|
|
|
|
openethereum.image.source="https://github.com/openethereum/openethereum/blob/${VCS_REF}/\
|
|
|
|
scripts/docker/hub/Dockerfile" \
|
|
|
|
openethereum.image.documentation="https://wiki.parity.io/Parity-Ethereum" \
|
|
|
|
openethereum.image.revision="${VCS_REF}" \
|
|
|
|
openethereum.image.created="${BUILD_DATE}"
|
2018-08-26 00:44:08 +02:00
|
|
|
|
2017-05-26 14:18:17 +02:00
|
|
|
# show backtraces
|
2018-08-26 00:44:08 +02:00
|
|
|
ENV RUST_BACKTRACE 1
|
|
|
|
|
2019-06-11 20:56:03 +02:00
|
|
|
# install tools and dependencies
|
|
|
|
RUN set -eux; \
|
|
|
|
apt-get update; \
|
|
|
|
apt-get install -y --no-install-recommends \
|
2020-09-22 14:53:52 +02:00
|
|
|
file curl jq ca-certificates; \
|
|
|
|
# apt cleanup
|
2019-06-11 20:56:03 +02:00
|
|
|
apt-get autoremove -y; \
|
|
|
|
apt-get clean; \
|
2020-09-22 14:53:52 +02:00
|
|
|
update-ca-certificates; \
|
2019-06-11 20:56:03 +02:00
|
|
|
rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*; \
|
2020-09-22 14:53:52 +02:00
|
|
|
# add user
|
|
|
|
groupadd -g 1000 openethereum; \
|
|
|
|
useradd -m -u 1000 -g openethereum -s /bin/sh openethereum
|
2018-10-03 14:10:05 +02:00
|
|
|
|
2020-09-22 14:53:52 +02:00
|
|
|
WORKDIR /home/openethereum
|
2019-02-12 19:00:52 +01:00
|
|
|
|
2020-09-22 14:53:52 +02:00
|
|
|
# add openethereum binary to docker image
|
|
|
|
COPY artifacts/x86_64-unknown-linux-gnu/openethereum /bin/openethereum
|
2019-06-11 20:56:03 +02:00
|
|
|
COPY tools/check_sync.sh /check_sync.sh
|
2018-10-26 13:51:08 +02:00
|
|
|
|
2020-09-22 14:53:52 +02:00
|
|
|
# switch to user openethereum here
|
|
|
|
USER openethereum
|
2018-11-27 12:51:42 +01:00
|
|
|
|
2019-06-11 20:56:03 +02:00
|
|
|
# check if executable works in this container
|
2020-09-22 14:53:52 +02:00
|
|
|
RUN openethereum --version
|
2019-06-11 20:56:03 +02:00
|
|
|
|
2018-08-26 00:44:08 +02:00
|
|
|
EXPOSE 5001 8080 8082 8083 8545 8546 8180 30303/tcp 30303/udp
|
2019-02-12 19:00:52 +01:00
|
|
|
|
2020-09-22 14:53:52 +02:00
|
|
|
ENTRYPOINT ["/bin/openethereum"]
|