forked from TrueCloudLab/frostfs-http-gw
docker: update dockerfile and make command
This commit is contained in:
parent
97d1a99f58
commit
798b9c9646
2 changed files with 4 additions and 4 deletions
|
@ -6,13 +6,13 @@ ARG REPO=github.com/nspcc-dev/neofs-gw
|
|||
|
||||
ENV GOGC off
|
||||
ENV CGO_ENABLED 0
|
||||
ENV LDFLAGS "-w -s -X ${REPO}/Version=${VERSION} -X ${REPO}/Build=${BUILD}"
|
||||
ENV LDFLAGS "-w -s -X main.Version=${VERSION}"
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY . /src
|
||||
|
||||
RUN go build -v -mod=vendor -ldflags "${LDFLAGS}" -o /go/bin/neofs-gw ./
|
||||
RUN go build -v -mod=vendor -ldflags "${LDFLAGS} -X main.Build=$(date -u +%s%N)" -o /go/bin/neofs-gw ./
|
||||
|
||||
# Executable image
|
||||
FROM scratch
|
||||
|
@ -21,3 +21,5 @@ WORKDIR /
|
|||
|
||||
COPY --from=builder /go/bin/neofs-gw /bin/neofs-gw
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||
|
||||
ENTRYPOINT ["/bin/neofs-gw"]
|
||||
|
|
2
Makefile
2
Makefile
|
@ -1,4 +1,3 @@
|
|||
REPO ?= $(shell go list -m)
|
||||
VERSION ?= "$(shell git describe --tags 2>/dev/null | sed 's/^v//')"
|
||||
|
||||
HUB_IMAGE=nspccdev/neofs
|
||||
|
@ -23,7 +22,6 @@ deps:
|
|||
image: deps
|
||||
@echo "${B}${G}⇒ Build GW docker-image ${R}"
|
||||
@docker build \
|
||||
--build-arg REPO=$(REPO) \
|
||||
--build-arg VERSION=$(VERSION) \
|
||||
-f Dockerfile \
|
||||
-t $(HUB_IMAGE)-http-gate:$(VERSION) .
|
||||
|
|
Loading…
Reference in a new issue