From 6684ea1e3ad30bacbcd4cc59e41fdd778df2fe8a Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Tue, 7 Jun 2022 22:05:57 +0300 Subject: [PATCH] [#159] Add docker/all target Signed-off-by: Alex Vanin --- Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5d34aec..52776f1 100644 --- a/Makefile +++ b/Makefile @@ -14,11 +14,20 @@ BINDIR = bin DIRS = $(BINDIR) 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 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 @echo "⇒ Build $@" CGO_ENABLED=0 \