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
|
FROM alpine
WORKDIR /app
ENV USER=certstreamserver
ENV UID=10001
# Create user
RUN adduser \
--disabled-password \
--gecos "" \
--home "/nonexistent" \
--shell "/sbin/nologin" \
--no-create-home \
--uid "${UID}" \
"${USER}"
# Copy our static executable.
COPY certstream-server-go /app/certstream-server-go
COPY ./config.sample.yaml /app/config.yaml
# Use an unprivileged user.
USER certstreamserver:certstreamserver
EXPOSE 8080
ENTRYPOINT ["/app/certstream-server-go"]
|