forked from vouch/vouch-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (24 loc) · 870 Bytes
/
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
# quay.io/vouch/vouch-proxy
# https://github.com/vouch/vouch-proxy
FROM golang:1.22 AS builder
ARG UID=999
ARG GID=999
LABEL maintainer="[email protected]"
RUN mkdir -p ${GOPATH}/src/github.com/vouch/vouch-proxy
WORKDIR ${GOPATH}/src/github.com/vouch/vouch-proxy
RUN groupadd -g $GID vouch \
&& useradd --system vouch --uid=$UID --gid=$GID
COPY . .
RUN ./do.sh goget
RUN ./do.sh gobuildstatic # see `do.sh` for vouch-proxy build details
RUN ./do.sh install
FROM scratch
LABEL maintainer="[email protected]"
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /etc/passwd /etc/passwd
COPY --from=builder /etc/group /etc/group
COPY --from=builder /go/bin/vouch-proxy /vouch-proxy
USER vouch
EXPOSE 9090
ENTRYPOINT ["/vouch-proxy"]
HEALTHCHECK --interval=1m --timeout=5s CMD [ "/vouch-proxy", "-healthcheck" ]