Skip to content

Commit 53fdd0f

Browse files
committed
Update dockerfile
1 parent fae2d5f commit 53fdd0f

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

Dockerfile

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
# Build
2-
FROM golang:1.18 AS builder
3-
1+
FROM golang:latest AS build
42
COPY . /otpauth
53
WORKDIR /otpauth
4+
ENV CGO_ENABLED=0
5+
RUN go build
66

7-
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/otpauth
8-
9-
# Run
107
FROM scratch
11-
12-
COPY --from=builder /otpauth/build/otpauth /app/otpauth
13-
8+
COPY --from=build /otpauth/otpauth /app/otpauth
149
ENTRYPOINT ["/app/otpauth"]

0 commit comments

Comments
 (0)