make/Makefile: generalize passing additional build arguments

Building of some images may require additional options to be passed.

Change-Id: Id1761062ac6ec1d1a4eb6a6b724e42cf576c848f
This commit is contained in:
Vadim Yanitskiy 2022-02-05 19:21:25 +06:00 committed by fixeria
parent 4403dbb0a5
commit 31b54054f7
2 changed files with 3 additions and 3 deletions

View File

@ -169,7 +169,7 @@ docker_images_require() {
echo "Building image: $i (export NO_DOCKER_IMAGE_BUILD=1 to prevent this)" echo "Building image: $i (export NO_DOCKER_IMAGE_BUILD=1 to prevent this)"
make -C "${IMAGE_DIR_PREFIX}/${dir}" \ make -C "${IMAGE_DIR_PREFIX}/${dir}" \
PULL="$pull_arg" \ BUILD_ARGS="$pull_arg" \
UPSTREAM_DISTRO="$upstream_distro_arg" \ UPSTREAM_DISTRO="$upstream_distro_arg" \
DISTRO="$distro_arg" \ DISTRO="$distro_arg" \
IMAGE="$REPO_USER/$i" \ IMAGE="$REPO_USER/$i" \

View File

@ -37,7 +37,7 @@ OSMO_SGSN_BRANCH?=master
OSMO_SIP_BRANCH?=master OSMO_SIP_BRANCH?=master
OSMO_STP_BRANCH?=master OSMO_STP_BRANCH?=master
OPEN5GS_BRANCH?=main OPEN5GS_BRANCH?=main
PULL?= BUILD_ARGS?=
UPSTREAM_DISTRO?=debian:bullseye UPSTREAM_DISTRO?=debian:bullseye
DISTRO?=debian-bullseye DISTRO?=debian-bullseye
@ -114,7 +114,7 @@ docker-build: .release
--build-arg OSMO_SIP_BRANCH=$(OSMO_SIP_BRANCH) \ --build-arg OSMO_SIP_BRANCH=$(OSMO_SIP_BRANCH) \
--build-arg OSMO_STP_BRANCH=$(OSMO_STP_BRANCH) \ --build-arg OSMO_STP_BRANCH=$(OSMO_STP_BRANCH) \
--build-arg OPEN5GS_BRANCH=$(OPEN5GS_BRANCH) \ --build-arg OPEN5GS_BRANCH=$(OPEN5GS_BRANCH) \
$(PULL) -t $(IMAGE):latest . $(BUILD_ARGS) -t $(IMAGE):latest .
@DOCKER_MAJOR=$(shell docker -v | sed -e 's/.*version //' -e 's/,.*//' | cut -d\. -f1) ; \ @DOCKER_MAJOR=$(shell docker -v | sed -e 's/.*version //' -e 's/,.*//' | cut -d\. -f1) ; \
DOCKER_MINOR=$(shell docker -v | sed -e 's/.*version //' -e 's/,.*//' | cut -d\. -f2) ; \ DOCKER_MINOR=$(shell docker -v | sed -e 's/.*version //' -e 's/,.*//' | cut -d\. -f2) ; \