Build docker image from iron/go, saves so much build size

This commit is contained in:
2022-12-17 14:24:02 +01:00
parent 79d7c4068b
commit 9486ad1069
2 changed files with 2 additions and 2 deletions

View File

@@ -10,7 +10,7 @@ RUN make build
# RUN make test
# Create production image for application with needed files
FROM golang:1.19-alpine
FROM iron/go
EXPOSE 8000

View File

@@ -4,7 +4,7 @@ PROJECT_NAME=$(shell basename $(CURDIR))
## build: build the application
build:
export GO111MODULE="on"; \
export GO111MODULE="auto"; \
go mod download; \
go mod vendor; \
CGO_ENABLED=0 go build -a -ldflags '-s' -installsuffix cgo -o main cmd/server/main.go