mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-23 12:31:07 +01:00
deployment/docker: pass -buildvs=false
to go build
for production builds
This should resolve the `error obtaining VCS status: exit status 128` error when the environment contains incorrect version of git or has incorrect access rights to the directory with VictoriaMetrics source code. See the following links for additional info: - https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2508#issuecomment-1117126702 , - https://github.com/google/ko/issues/672 - https://github.com/golang/go/issues/49004
This commit is contained in:
parent
3dbdd4ef8a
commit
991688ea65
@ -34,7 +34,7 @@ app-via-docker: package-builder
|
||||
--env GO111MODULE=on \
|
||||
$(DOCKER_OPTS) \
|
||||
$(BUILDER_IMAGE) \
|
||||
go build $(RACE) -mod=vendor -trimpath \
|
||||
go build $(RACE) -mod=vendor -trimpath -buildvcs=false \
|
||||
-ldflags "-extldflags '-static' $(GO_BUILDINFO)" \
|
||||
-tags 'netgo osusergo nethttpomithttp2 musl' \
|
||||
-o bin/$(APP_NAME)$(APP_SUFFIX)-prod $(PKG_PREFIX)/app/$(APP_NAME)
|
||||
@ -50,7 +50,7 @@ app-via-docker-windows: package-builder
|
||||
--env GO111MODULE=on \
|
||||
$(DOCKER_OPTS) \
|
||||
$(BUILDER_IMAGE) \
|
||||
go build $(RACE) -mod=vendor -trimpath \
|
||||
go build $(RACE) -mod=vendor -trimpath -buildvcs=false \
|
||||
-ldflags "-s -w -extldflags '-static' $(GO_BUILDINFO)" \
|
||||
-tags 'netgo osusergo nethttpomithttp2' \
|
||||
-o bin/$(APP_NAME)-windows$(APP_SUFFIX)-prod.exe $(PKG_PREFIX)/app/$(APP_NAME)
|
||||
|
Loading…
Reference in New Issue
Block a user