forked from eth-educators/eth-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.binary
32 lines (22 loc) · 906 Bytes
/
Dockerfile.binary
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
ARG DOCKER_TAG
FROM statusim/nimbus-eth2:${DOCKER_TAG}
# Included here to avoid build-time complaints
ARG BUILD_TARGET
ARG UID=10002
USER root
RUN groupmod -g "${UID}" user && usermod -u "${UID}" -g "${UID}" user
RUN set -eux; \
apt-get update; \
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y gosu ca-certificates bash tzdata; \
rm -rf /var/lib/apt/lists/*; \
# verify that the binary works
gosu nobody true
# Create data mount point with permissions
RUN mkdir -p /var/lib/nimbus && chown -R user:user /var/lib/nimbus && chmod 700 /var/lib/nimbus
# Copy beacon_node into $PATH
RUN cp /home/user/nimbus-eth2/build/nimbus_beacon_node /usr/local/bin/nimbus_beacon_node
# Scripts for privilege change and validator import
COPY ./validator-import.sh /usr/local/bin/
COPY ./docker-entrypoint.sh /usr/local/bin/
USER user
ENTRYPOINT ["nimbus_beacon_node"]