forked from eth-educators/eth-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.binary
34 lines (25 loc) · 1.04 KB
/
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
33
34
ARG DOCKER_TAG
ARG DOCKER_REPO
FROM ${DOCKER_REPO}:${DOCKER_TAG}
#Next two are unused but included to avoid warnings
ARG BUILD_TARGET
ARG SRC_REPO
ARG USER=teku
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 tzdata git; \
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/teku/validator-keys && mkdir -p /var/lib/teku/validator-passwords && mkdir -p /var/lib/teku/ee-secret && chown -R ${USER}:${USER} /var/lib/teku && chmod -R 700 /var/lib/teku && chmod 777 /var/lib/teku/ee-secret
# Cannot assume buildkit, hence no chmod
COPY --chown=${USER}:${USER} ./docker-entrypoint.sh /usr/local/bin/
COPY --chown=${USER}:${USER} ./docker-entrypoint-vc.sh /usr/local/bin/
# Belt and suspenders
RUN chmod -R 755 /usr/local/bin/*
USER ${USER}
ENTRYPOINT ["/opt/teku/bin/teku"]