Debian Codegraph @

docker/Dockerfile.goreleaser

raw
1 # This Dockerfile builds an image from a precompiled certstream binary.
2 # The binary is built using goreleaser and stored in the $TARGETPLATFORM directory.
3 FROM alpine
4 ARG TARGETPLATFORM
5
6 WORKDIR /app
7
8 ENV USER=certstreamserver
9 ENV UID=10001
10
11 # Create user
12 RUN adduser \
13 --disabled-password \
14 --gecos "" \
15 --home "/nonexistent" \
16 --shell "/sbin/nologin" \
17 --no-create-home \
18 --uid "${UID}" \
19 "${USER}"
20
21 # Copy our static executable.
22 COPY $TARGETPLATFORM/certstream-server-go /app/certstream-server-go
23 COPY ./config.docker.yaml /app/config/config.yaml
24 RUN chown -R certstreamserver:certstreamserver /app/
25
26 # Use an unprivileged user.
27 USER certstreamserver:certstreamserver
28
29 EXPOSE 8080
30
31 ENTRYPOINT ["/app/certstream-server-go", "-config", "/app/config/config.yaml"]