forked from cyberark/authn-jwt-gitlab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (25 loc) · 861 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
34
35
36
37
38
39
40
FROM golang:1.19 as builder
WORKDIR /go/src/github.com/cyberark/authn-jwt-gitlab
COPY . .
RUN go get -d -v ./...
RUN go install -v ./...
FROM golang:1.19-alpine as builder-alpine
WORKDIR /go/src/github.com/cyberark/authn-jwt-gitlab
COPY . .
RUN go get -d -v ./...
RUN go install -v ./...
FROM ubuntu:kinetic as ubuntu
COPY --from=builder /go/bin/authn-jwt-gitlab /authn-jwt-gitlab
RUN apt-get update && \
apt-get install -y ca-certificates && \
update-ca-certificates && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
FROM alpine:3.18 as alpine
COPY --from=builder-alpine /go/bin/authn-jwt-gitlab /authn-jwt-gitlab
RUN apk add --no-cache ca-certificates && \
update-ca-certificates
CMD ["/authn-jwt-gitlab"]
FROM redhat/ubi8:8.8 as ubi
COPY --from=builder /go/bin/authn-jwt-gitlab /authn-jwt-gitlab
CMD ["/authn-jwt-gitlab"]