21 lines
No EOL
275 B
Docker
21 lines
No EOL
275 B
Docker
FROM docker.io/golang:1.23-alpine3.20 AS compile
|
|
|
|
ENV CGO_ENABLED=0
|
|
|
|
WORKDIR /app
|
|
|
|
COPY go.mod go.sum /app/
|
|
RUN go mod download
|
|
|
|
COPY *.go /app/
|
|
RUN go build -o app .
|
|
|
|
FROM docker.io/alpine:3.20
|
|
|
|
WORKDIR /
|
|
|
|
RUN apk add git
|
|
|
|
COPY --from=compile /app/app /
|
|
|
|
ENTRYPOINT ["/app"] |