Skip to content

Commit 7a398f6

Browse files
committed
ci: add dockerfile
1 parent 20448aa commit 7a398f6

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
FROM golang:alpine AS builder
3+
4+
RUN apk update && apk add --no-cache git
5+
WORKDIR $GOPATH/src
6+
COPY . .
7+
RUN go mod download
8+
RUN go mod verify
9+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /go/bin/ory-kratos-oauth2-redirector
10+
11+
FROM scratch
12+
ENV PORT=3000
13+
ENV REDIRECT_SESSION_PARAM_KEY=ory_kratos_session
14+
ENV SESSION_COOKIE_KEY=ory_kratos_session
15+
COPY --from=builder /go/bin/ory-kratos-oauth2-redirector /go/bin/ory-kratos-oauth2-redirector
16+
EXPOSE $PORT
17+
ENTRYPOINT ["/go/bin/ory-kratos-oauth2-redirector"]

0 commit comments

Comments
 (0)