21 lines
275 B
Text
21 lines
275 B
Text
|
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"]
|