forked from eth-educators/eth-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.binary
35 lines (24 loc) · 949 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
33
34
35
ARG DOCKER_TAG
ARG DOCKER_REPO
FROM flyway/flyway:latest as flyway
FROM ${DOCKER_REPO}:${DOCKER_TAG}
ARG USER=web3signer
ARG UID=10000
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; \
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/web3signer/keys && chown -R ${USER}:${USER} /var/lib/web3signer && chmod -R 700 /var/lib/web3signer
# Cannot assume buildkit, hence no chmod
COPY --chown=${USER}:${USER} ./docker-entrypoint.sh /usr/local/bin/
# Belt and suspenders
RUN chmod -R 755 /usr/local/bin/*
# Flyway for initial migrations
COPY --from=flyway --chown=${USER}:${USER} /flyway /flyway
USER ${USER}
ENTRYPOINT ["/opt/web3signer/bin/web3signer"]