forked from vouch/vouch-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.alpine
38 lines (28 loc) · 963 Bytes
/
Dockerfile.alpine
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
# quay.io/vouch/vouch-proxy
# https://github.com/vouch/vouch-proxy
FROM golang:1.18 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
COPY . .
RUN ./do.sh goget
RUN ./do.sh gobuildstatic # see `do.sh` for vouch-proxy build details
RUN ./do.sh install
RUN groupadd -g $GID vouch \
&& useradd --system vouch --uid=$UID --gid=$GID
FROM alpine:latest
LABEL maintainer="[email protected]"
ENV VOUCH_ROOT=/
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
# do.sh requires bash
RUN apk add --no-cache bash
COPY do.sh /do.sh
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" ]