up go version

This commit is contained in:
Ruidy 2022-09-06 18:19:09 +02:00
parent 832694658a
commit 996f60287b
2 changed files with 9 additions and 6 deletions

View file

@ -1,20 +1,23 @@
FROM golang:1.18-alpine AS build FROM golang:1.19-alpine AS build
ENV CGO_ENABLED 0 ENV CGO_ENABLED 0
ENV GOOS linux ENV GOOS linux
ENV GOARCH amd64 ENV GOARCH amd64
WORKDIR /app WORKDIR /app
RUN apk -U upgrade --no-cache
COPY go.* . COPY go.* ./
RUN go mod download RUN go mod download
COPY . . COPY . ./
RUN go build -o ./out/dist . RUN go build -ldflags="-s -w" -o ./out/dist .
FROM alpine:latest FROM alpine:latest
RUN apk upgrade --no-cache RUN apk -U upgrade --no-cache
COPY --from=build /app/out/dist . COPY --from=build /app/out/dist .
EXPOSE 80
CMD ./dist CMD ./dist

View file

@ -1,6 +1,6 @@
module go-app module go-app
go 1.18 go 1.19
require ( require (
github.com/gin-gonic/gin v1.7.3 github.com/gin-gonic/gin v1.7.3