ovpn-certman/Dockerfile

23 lines
785 B
Docker
Raw Normal View History

2018-04-22 19:38:44 +02:00
FROM golang:1.10
2018-02-03 18:14:47 +01:00
WORKDIR /go/src/git.klink.asia/paul/certman
ADD . .
RUN \
2018-02-03 18:34:56 +01:00
go get -tags="dev" -v git.klink.asia/paul/certman && \
2018-02-03 18:14:47 +01:00
go get github.com/shurcooL/vfsgen/cmd/vfsgendev && \
go generate git.klink.asia/paul/certman/assets && \
2018-02-03 18:34:56 +01:00
go build -tags="netgo"
2018-02-03 18:14:47 +01:00
FROM scratch
ENV \
OAUTH2_CLIENT_ID="" \
OAUTH2_CLIENT_SECRET="" \
OAUTH2_AUTH_URL="https://gitlab.example.com/oauth/authorize" \
OAUTH2_TOKEN_URL="https://gitlab.example.com/oauth/token" \
2018-02-03 19:25:24 +01:00
OAUTH2_REDIRECT_URL="https://certman.example.com/login/oauth2/redirect" \
2018-02-03 18:14:47 +01:00
USER_ENDPOINT="https://gitlab.example.com/api/v4/user" \
2018-02-03 19:25:24 +01:00
APP_KEY=""
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
2018-02-03 18:14:47 +01:00
COPY --from=0 /go/src/git.klink.asia/paul/certman/certman /
ENTRYPOINT ["/certman"]