Merge "Fixed docker build space issue"

This commit is contained in:
Zuul 2020-05-19 20:00:56 +00:00 committed by Gerrit Code Review
commit 01deda7825

View File

@ -19,6 +19,7 @@ DOCKER_MAKE_TARGET := build
# docker image options # docker image options
DOCKER_REGISTRY ?= quay.io DOCKER_REGISTRY ?= quay.io
DOCKER_FORCE_CLEAN ?= true
DOCKER_IMAGE_NAME ?= airshipctl DOCKER_IMAGE_NAME ?= airshipctl
DOCKER_IMAGE_PREFIX ?= airshipit DOCKER_IMAGE_PREFIX ?= airshipit
DOCKER_IMAGE_TAG ?= dev DOCKER_IMAGE_TAG ?= dev
@ -111,12 +112,14 @@ ifeq ($(USE_PROXY), true)
--build-arg NO_PROXY=$(NO_PROXY) \ --build-arg NO_PROXY=$(NO_PROXY) \
--build-arg MAKE_TARGET=$(DOCKER_MAKE_TARGET) \ --build-arg MAKE_TARGET=$(DOCKER_MAKE_TARGET) \
--tag $(DOCKER_IMAGE) \ --tag $(DOCKER_IMAGE) \
--target $(DOCKER_TARGET_STAGE) --target $(DOCKER_TARGET_STAGE) \
--force-rm=$(DOCKER_FORCE_CLEAN)
else else
@docker build . --network=host \ @docker build . --network=host \
--build-arg MAKE_TARGET=$(DOCKER_MAKE_TARGET) \ --build-arg MAKE_TARGET=$(DOCKER_MAKE_TARGET) \
--tag $(DOCKER_IMAGE) \ --tag $(DOCKER_IMAGE) \
--target $(DOCKER_TARGET_STAGE) --target $(DOCKER_TARGET_STAGE) \
--force-rm=$(DOCKER_FORCE_CLEAN)
endif endif
ifeq ($(PUBLISH), true) ifeq ($(PUBLISH), true)
@docker push $(DOCKER_IMAGE) @docker push $(DOCKER_IMAGE)