mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
moves prod images build into alpine container with musl (#1640)
adds gcc and musl-dev to builder container
This commit is contained in:
parent
9f19649672
commit
3f1e6da1d7
2 changed files with 3 additions and 2 deletions
|
@ -4,7 +4,7 @@ DOCKER_NAMESPACE := victoriametrics
|
|||
|
||||
ROOT_IMAGE ?= alpine:3.14.2
|
||||
CERTS_IMAGE := alpine:3.14.2
|
||||
GO_BUILDER_IMAGE := golang:1.17.1
|
||||
GO_BUILDER_IMAGE := golang:1.17.1-alpine
|
||||
BUILDER_IMAGE := local/builder:2.0.0-$(shell echo $(GO_BUILDER_IMAGE) | tr : _)
|
||||
BASE_IMAGE := local/base:1.1.3-$(shell echo $(ROOT_IMAGE) | tr : _)-$(shell echo $(CERTS_IMAGE) | tr : _)
|
||||
|
||||
|
@ -36,7 +36,7 @@ app-via-docker: package-builder
|
|||
$(BUILDER_IMAGE) \
|
||||
go build $(RACE) -mod=vendor -trimpath \
|
||||
-ldflags "-extldflags '-static' $(GO_BUILDINFO)" \
|
||||
-tags 'netgo osusergo nethttpomithttp2' \
|
||||
-tags 'netgo osusergo nethttpomithttp2 musl' \
|
||||
-o bin/$(APP_NAME)$(APP_SUFFIX)-prod $(PKG_PREFIX)/app/$(APP_NAME)
|
||||
|
||||
app-via-docker-windows: package-builder
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
ARG go_builder_image
|
||||
FROM $go_builder_image
|
||||
STOPSIGNAL SIGINT
|
||||
RUN apk add gcc musl-dev make --no-cache
|
Loading…
Reference in a new issue