From 9428ec9c9f3e17fe3bb2e170e6787722b734fc30 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 13 Sep 2019 22:43:56 +0300 Subject: [PATCH] deployment/docker: remove file system paths from the compiled binary --- deployment/docker/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deployment/docker/Makefile b/deployment/docker/Makefile index 0c5330402..c3b47f97b 100644 --- a/deployment/docker/Makefile +++ b/deployment/docker/Makefile @@ -21,7 +21,8 @@ app-via-docker: package-certs package-builder --env GO111MODULE=on \ $(DOCKER_OPTS) \ $(BUILDER_IMAGE) \ - go build $(RACE) -mod=vendor -ldflags "-s -w -extldflags '-static' $(GO_BUILDINFO)" -tags 'netgo osusergo' -o bin/$(APP_NAME)$(APP_SUFFIX)-prod $(PKG_PREFIX)/app/$(APP_NAME) + go build $(RACE) -mod=vendor -trimpath -ldflags "-s -w -extldflags '-static' $(GO_BUILDINFO)" -tags 'netgo osusergo' \ + -o bin/$(APP_NAME)$(APP_SUFFIX)-prod $(PKG_PREFIX)/app/$(APP_NAME) package-via-docker: (docker image ls --format '{{.Repository}}:{{.Tag}}' | grep -q '$(DOCKER_NAMESPACE)/$(APP_NAME):$(PKG_TAG)$(RACE)') || (\