Initial commit

This commit is contained in:
Lauri Võsandi
2023-02-23 09:33:01 +02:00
commit 7dd865de3a
9 changed files with 750 additions and 0 deletions

12
Dockerfile Normal file
View File

@@ -0,0 +1,12 @@
FROM golang:1.19 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 .
FROM scratch
WORKDIR /
COPY --from=build /go/server /server
ENV GIN_MODE=release
ENTRYPOINT ["/server"]