Merge pull request #58 from masterSplinter01/feature/57-fix-docker-builds
[#57] Fix docker builds
This commit is contained in:
commit
69e6f206dc
2 changed files with 6 additions and 3 deletions
|
@ -8,9 +8,10 @@ RUN set -x \
|
||||||
|
|
||||||
COPY . /src
|
COPY . /src
|
||||||
|
|
||||||
|
ARG REPO=github.com/nspcc-dev/neofs-s3-gw
|
||||||
ARG VERSION=dev
|
ARG VERSION=dev
|
||||||
|
|
||||||
RUN make
|
RUN set -x && make -o dep # run make without dep dependency
|
||||||
|
|
||||||
# Executable image
|
# Executable image
|
||||||
FROM scratch
|
FROM scratch
|
||||||
|
@ -18,6 +19,7 @@ FROM scratch
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|
||||||
COPY --from=builder /src/bin/neofs-s3-gw /bin/neofs-s3-gw
|
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/
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||||
|
|
||||||
ENTRYPOINT ["/bin/neofs-s3-gw"]
|
ENTRYPOINT ["/bin/neofs-s3-gw"]
|
||||||
|
|
5
Makefile
5
Makefile
|
@ -10,7 +10,8 @@ CMDS = $(addprefix neofs-, $(notdir $(wildcard cmd/*)))
|
||||||
BINS = $(addprefix $(BINDIR)/, $(CMDS))
|
BINS = $(addprefix $(BINDIR)/, $(CMDS))
|
||||||
|
|
||||||
# Variables for docker
|
# 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//')"
|
HUB_TAG ?= "$(shell echo ${VERSION} | sed 's/^v//')"
|
||||||
|
|
||||||
.PHONY: help all dep clean format test cover lint docker/lint image-push image dirty-image
|
.PHONY: help all dep clean format test cover lint docker/lint image-push image dirty-image
|
||||||
|
@ -55,7 +56,7 @@ format:
|
||||||
@goimports -w ./
|
@goimports -w ./
|
||||||
|
|
||||||
# Build clean Docker image
|
# Build clean Docker image
|
||||||
image:
|
image: dep
|
||||||
@echo "⇒ Build NeoFS S3 Gateway docker image "
|
@echo "⇒ Build NeoFS S3 Gateway docker image "
|
||||||
@docker build \
|
@docker build \
|
||||||
--build-arg REPO=$(REPO) \
|
--build-arg REPO=$(REPO) \
|
||||||
|
|
Loading…
Reference in a new issue