-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (32 loc) · 1.08 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM chainguard/wolfi-base:latest
# Include curl in the final image.
RUN set -ex \
&& apk update \
&& apk add --no-cache curl tini \
&& rm -rf /var/cache/apk/* \
&& rm -rf /tmp/*
STOPSIGNAL SIGTERM
# Set environment variables with defaults
ENV TOKENSMITH_ISSUER="https://tokensmith.openchami.dev"
ENV TOKENSMITH_CLUSTER_ID="default-cluster"
ENV TOKENSMITH_OPENCHAMI_ID="default-openchami"
ENV TOKENSMITH_CONFIG="/tokensmith/config.json"
ENV TOKENSMITH_KEY_DIR="/tokensmith/keys"
ENV TOKENSMITH_OIDC_PROVIDER="hydra"
ENV TOKENSMITH_PORT="8080"
VOLUME /tokensmith/keys
VOLUME /tokensmith/config
# Get the tokensmith service from the goreleaser build.
COPY tokensmith /usr/local/bin/
# nobody 65534:65534
USER 65534:65534
# Set up the command to start the service.
CMD /usr/local/bin/tokensmith serve \
--provider=${TOKENSMITH_OIDC_PROVIDER} \
--issuer=${TOKENSMITH_ISSUER} \
--port=${TOKENSMITH_PORT} \
--cluster-id=${TOKENSMITH_CLUSTER_ID} \
--openchami-id=${TOKENSMITH_OPENCHAMI_ID} \
--config=${TOKENSMITH_CONFIG} \
--key-dir=${TOKENSMITH_KEY_DIR}
ENTRYPOINT ["/sbin/tini", "--"]