-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
27 lines (24 loc) · 1.12 KB
/
Dockerfile
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
# Build this Dockerfile with goreleaser.
# The binary must be present at /conduit
FROM debian:bullseye-slim
# Hard code UID/GID to 999 for consistency in advanced deployments.
# Install ca-certificates to enable using infra providers.
# Install gosu for fancy data directory management.
RUN groupadd --gid=999 --system algorand && \
useradd --uid=999 --no-log-init --create-home --system --gid algorand algorand && \
mkdir -p /data && \
chown -R algorand.algorand /data && \
apt-get update && \
apt-get install -y --no-install-recommends gosu ca-certificates && \
update-ca-certificates && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY ./cmd/conduit/conduit /usr/local/bin/conduit
COPY ./docker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
ENV CONDUIT_DATA_DIR /data
WORKDIR /data
# Note: docker-entrypoint.sh calls 'conduit'. Similar entrypoint scripts
# accept the binary as the first argument in order to surface a suite of
# tools (i.e. algod, goal, algocfg, ...). Maybe this will change in the
# future, but for now this approach seemed simpler.
ENTRYPOINT ["docker-entrypoint.sh"]