This commit is contained in:
14
Dockerfile
Normal file
14
Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
||||
FROM golang:1.24.1-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o app src/main.go
|
||||
|
||||
FROM gcr.io/distroless/static
|
||||
|
||||
WORKDIR /
|
||||
COPY --from=builder /app/app .
|
||||
ENTRYPOINT ["./app"]
|
||||
CMD ["--version"]
|
||||
Reference in New Issue
Block a user