Skip to content

Commit

Permalink
Update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
dim13 committed Dec 26, 2023
1 parent fae2d5f commit 53fdd0f
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# Build
FROM golang:1.18 AS builder

FROM golang:latest AS build
COPY . /otpauth
WORKDIR /otpauth
ENV CGO_ENABLED=0
RUN go build

RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/otpauth

# Run
FROM scratch

COPY --from=builder /otpauth/build/otpauth /app/otpauth

COPY --from=build /otpauth/otpauth /app/otpauth
ENTRYPOINT ["/app/otpauth"]

0 comments on commit 53fdd0f

Please sign in to comment.