diff --git a/Dockerfile b/Dockerfile index e5642c56..c7f8fda2 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 bc6474f0..94597d46 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