From ac2e61a6997af33be97c1d313f154175b55a78f7 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Thu, 26 Aug 2021 11:09:06 -0400 Subject: [PATCH] makefile: add a variable for passing additional container build options The one I often use is "--no-cache" to force a rebuild. Adding a var to the makefile makes it so I don't have to get too hacky with it. Signed-off-by: John Mulligan --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index dc95bf8..562c6b8 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ CI_IMAGE_NAME = go-ceph-ci CONTAINER_CMD ?= CONTAINER_OPTS := --security-opt $(shell grep -q selinux /sys/kernel/security/lsm 2>/dev/null && echo "label=disable" || echo "apparmor:unconfined") +CONTAINER_BUILD_OPTS := CONTAINER_CONFIG_DIR := testing/containers/ceph VOLUME_FLAGS := CEPH_VERSION := octopus @@ -164,6 +165,7 @@ $(BUILDFILE): $(CONTAINER_CONFIG_DIR)/Dockerfile entrypoint.sh micro-osd.sh $(CONTAINER_CMD) build \ --build-arg GO_CEPH_VERSION=$(CEPH_VERSION) \ --build-arg CEPH_TAG=$(CEPH_TAG) \ + $(CONTAINER_BUILD_OPTS) \ -t $(CI_IMAGE_TAG) \ -f $(CONTAINER_CONFIG_DIR)/Dockerfile . @$(CONTAINER_CMD) inspect -f '{{.Id}}' $(CI_IMAGE_TAG) > $(BUILDFILE)