Use UBUNTU_BASE_IMAGE instead of BASE_IMAGE
Offering better alignment with some downstream build jobs. Change-Id: I90332926b4e5dd04b00b6008d06d36624086e313
This commit is contained in:
parent
c7472d7f60
commit
919868e16c
39
Makefile
39
Makefile
@ -31,7 +31,7 @@ PROXY ?= http://proxy.foo.com:8000
|
||||
NO_PROXY ?= localhost,127.0.0.1,.svc.cluster.local
|
||||
USE_PROXY ?= false
|
||||
|
||||
BASE_IMAGE ?=
|
||||
UBUNTU_BASE_IMAGE ?=
|
||||
|
||||
IMAGE:=${DOCKER_REGISTRY}/${IMAGE_PREFIX}/$(IMAGE_NAME):${IMAGE_TAG}
|
||||
IMAGE_DIR:=images/$(IMAGE_NAME)
|
||||
@ -45,7 +45,7 @@ images: $(IMAGE_NAME)
|
||||
$(IMAGE_NAME):
|
||||
@echo
|
||||
@echo "===== Processing [$@] image ====="
|
||||
@make build_$@ IMAGE=${DOCKER_REGISTRY}/${IMAGE_PREFIX}/$@:${IMAGE_TAG} IMAGE_DIR=images/$@ IMAGE_NAME=$@
|
||||
@make build IMAGE=${DOCKER_REGISTRY}/${IMAGE_PREFIX}/$@:${IMAGE_TAG} IMAGE_DIR=images/$@ IMAGE_NAME=$@
|
||||
@make run IMAGE=${DOCKER_REGISTRY}/${IMAGE_PREFIX}/$@:${IMAGE_TAG} SCRIPT=./tools/$@_image_run.sh
|
||||
|
||||
# Build all docker images for this project
|
||||
@ -81,39 +81,10 @@ tests:
|
||||
run:
|
||||
USE_PROXY=$(USE_PROXY) PROXY=$(PROXY) $(SCRIPT) $(IMAGE)
|
||||
|
||||
_BASE_IMAGE_ARG := $(if $(BASE_IMAGE),--build-arg FROM="${BASE_IMAGE}" ,)
|
||||
_BASE_IMAGE_ARG := $(if $(UBUNTU_BASE_IMAGE),--build-arg FROM="${UBUNTU_BASE_IMAGE}" ,)
|
||||
|
||||
.PHONY: build_airflow
|
||||
build_airflow:
|
||||
ifeq ($(USE_PROXY), true)
|
||||
docker build --network host -t $(IMAGE) --label $(LABEL) \
|
||||
--label "org.opencontainers.image.revision=$(COMMIT)" \
|
||||
--label "org.opencontainers.image.created=$(shell date --rfc-3339=seconds --utc)" \
|
||||
--label "org.opencontainers.image.title=$(IMAGE_NAME)" \
|
||||
-f $(IMAGE_DIR)/Dockerfile \
|
||||
$(_BASE_IMAGE_ARG) \
|
||||
--build-arg http_proxy=$(PROXY) \
|
||||
--build-arg https_proxy=$(PROXY) \
|
||||
--build-arg HTTP_PROXY=$(PROXY) \
|
||||
--build-arg HTTPS_PROXY=$(PROXY) \
|
||||
--build-arg no_proxy=$(NO_PROXY) \
|
||||
--build-arg NO_PROXY=$(NO_PROXY) \
|
||||
--build-arg ctx_base=$(BUILD_CTX) .
|
||||
else
|
||||
docker build --network host -t $(IMAGE) --label $(LABEL) \
|
||||
--label "org.opencontainers.image.revision=$(COMMIT)" \
|
||||
--label "org.opencontainers.image.created=$(shell date --rfc-3339=seconds --utc)" \
|
||||
--label "org.opencontainers.image.title=$(IMAGE_NAME)" \
|
||||
-f $(IMAGE_DIR)/Dockerfile \
|
||||
$(_BASE_IMAGE_ARG) \
|
||||
--build-arg ctx_base=$(BUILD_CTX) .
|
||||
endif
|
||||
ifeq ($(PUSH_IMAGE), true)
|
||||
docker push $(IMAGE)
|
||||
endif
|
||||
|
||||
.PHONY: build_shipyard
|
||||
build_shipyard:
|
||||
.PHONY: build
|
||||
build:
|
||||
ifeq ($(USE_PROXY), true)
|
||||
docker build --network host -t $(IMAGE) --label $(LABEL) \
|
||||
--label "org.opencontainers.image.revision=$(COMMIT)" \
|
||||
|
Loading…
Reference in New Issue
Block a user