From 580da7373bbe6c4485d8e88566a6e07eae7290b0 Mon Sep 17 00:00:00 2001 From: Evgeniy Kulikov Date: Tue, 1 Dec 2020 10:56:02 +0300 Subject: [PATCH] Change ENV prefix TODO should be replaced with S3_GW before release Signed-off-by: Evgeniy Kulikov --- Dockerfile | 7 +++---- Makefile | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index e5642c56c..c7f8fda26 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ RUN set -x \ -v \ -mod=vendor \ -trimpath \ - -ldflags "${LDFLAGS} -X main.Build=$(date -u +%s%N) -X main.Prefix=S3_GW" \ + -ldflags "${LDFLAGS} -X ${REPO}/misc.Prefix=S3_GW" \ -o /go/bin/neofs-s3 ./cmd/gate \ && upx -3 /go/bin/neofs-s3 @@ -33,8 +33,7 @@ FROM scratch WORKDIR / -COPY --from=builder /go/bin/neofs-s3 /usr/bin/neofs-s3 +COPY --from=builder /go/bin/neofs-s3 /bin/neofs-s3 COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ -# Run delve -CMD ["/usr/bin/neofs-s3"] +ENTRYPOINT ["/bin/neofs-s3"] diff --git a/Makefile b/Makefile index bc6474f02..94597d462 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ help: # Show current version version: - @echo $(VERSION) + @echo $(BUILD_VERSION) # Reformat code format: @@ -38,6 +38,6 @@ deps: image-build: @echo "⇒ Build docker-image" @docker build \ - --build-arg VERSION=$(VERSION) \ + --build-arg VERSION=$(BUILD_VERSION) \ -f Dockerfile \ - -t nspccdev/neofs-s3-gate:$(VERSION) . \ No newline at end of file + -t nspccdev/neofs-s3-gate:$(BUILD_VERSION) . \ No newline at end of file