[#159] Add docker/all target

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2022-06-07 22:05:57 +03:00 committed by Alex Vanin
parent 40e86fbfd6
commit 6684ea1e3a

View file

@ -14,11 +14,20 @@ BINDIR = bin
DIRS = $(BINDIR) DIRS = $(BINDIR)
BINS = $(BINDIR)/neofs-http-gw BINS = $(BINDIR)/neofs-http-gw
.PHONY: all $(BINS) $(DIRS) docker/$(BINS) dep test cover fmt image image-push dirty-image lint docker/lint version clean .PHONY: all docker/all $(BINS) $(DIRS) docker/$(BINS) dep test cover fmt image image-push dirty-image lint docker/lint version clean
# Make all binaries # Make all binaries
all: $(BINS) all: $(BINS)
docker/all:
@echo "=> Building binary using clean Docker environment"
@docker run --rm -t \
-v `pwd`:/src \
-w /src \
-u "$$(id -u):$$(id -g)" \
--env HOME=/src \
golang:$(GO_VERSION) make all
$(BINS): $(DIRS) dep $(BINS): $(DIRS) dep
@echo "⇒ Build $@" @echo "⇒ Build $@"
CGO_ENABLED=0 \ CGO_ENABLED=0 \