This commit is contained in:
2025-12-10 08:12:52 +02:00
parent 1d2c23440c
commit cbec350da2
15 changed files with 147 additions and 325 deletions

View File

@@ -1,9 +1,9 @@
FROM golang:1.19 AS build
FROM golang:1.24 AS build
WORKDIR /go/src/github.com/codemowers/hello-gin/
COPY go.mod go.sum ./
RUN go mod download
COPY cmd ./
RUN go build -ldflags "-linkmode 'external' -extldflags '-static'" -o /go/server .
RUN go build -tags netgo -ldflags "-linkmode 'external' -extldflags '-static'" -o /go/server .
FROM scratch
WORKDIR /