Merge pull request #58 from masterSplinter01/feature/57-fix-docker-builds

[#57] Fix docker builds
This commit is contained in:
Roman Khimov 2021-05-24 16:04:35 +03:00 committed by GitHub
commit 69e6f206dc
2 changed files with 6 additions and 3 deletions

View file

@ -8,9 +8,10 @@ RUN set -x \
COPY . /src
ARG REPO=github.com/nspcc-dev/neofs-s3-gw
ARG VERSION=dev
RUN make
RUN set -x && make -o dep # run make without dep dependency
# Executable image
FROM scratch
@ -18,6 +19,7 @@ FROM scratch
WORKDIR /
COPY --from=builder /src/bin/neofs-s3-gw /bin/neofs-s3-gw
COPY --from=builder /src/bin/neofs-authmate /bin/neofs-authmate
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
ENTRYPOINT ["/bin/neofs-s3-gw"]

View file

@ -10,7 +10,8 @@ CMDS = $(addprefix neofs-, $(notdir $(wildcard cmd/*)))
BINS = $(addprefix $(BINDIR)/, $(CMDS))
# Variables for docker
HUB_IMAGE ?= "nspccdev/$(BIN_NAME)"
REPO_BASENAME = $(shell basename `go list -m`)
HUB_IMAGE ?= "nspccdev/$(REPO_BASENAME)"
HUB_TAG ?= "$(shell echo ${VERSION} | sed 's/^v//')"
.PHONY: help all dep clean format test cover lint docker/lint image-push image dirty-image
@ -55,7 +56,7 @@ format:
@goimports -w ./
# Build clean Docker image
image:
image: dep
@echo "⇒ Build NeoFS S3 Gateway docker image "
@docker build \
--build-arg REPO=$(REPO) \