mirror of https://github.com/ceph/go-ceph
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 <jmulligan@redhat.com>
This commit is contained in:
parent
c7fb7aaa7c
commit
ac2e61a699
2
Makefile
2
Makefile
|
@ -1,6 +1,7 @@
|
||||||
CI_IMAGE_NAME = go-ceph-ci
|
CI_IMAGE_NAME = go-ceph-ci
|
||||||
CONTAINER_CMD ?=
|
CONTAINER_CMD ?=
|
||||||
CONTAINER_OPTS := --security-opt $(shell grep -q selinux /sys/kernel/security/lsm 2>/dev/null && echo "label=disable" || echo "apparmor:unconfined")
|
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
|
CONTAINER_CONFIG_DIR := testing/containers/ceph
|
||||||
VOLUME_FLAGS :=
|
VOLUME_FLAGS :=
|
||||||
CEPH_VERSION := octopus
|
CEPH_VERSION := octopus
|
||||||
|
@ -164,6 +165,7 @@ $(BUILDFILE): $(CONTAINER_CONFIG_DIR)/Dockerfile entrypoint.sh micro-osd.sh
|
||||||
$(CONTAINER_CMD) build \
|
$(CONTAINER_CMD) build \
|
||||||
--build-arg GO_CEPH_VERSION=$(CEPH_VERSION) \
|
--build-arg GO_CEPH_VERSION=$(CEPH_VERSION) \
|
||||||
--build-arg CEPH_TAG=$(CEPH_TAG) \
|
--build-arg CEPH_TAG=$(CEPH_TAG) \
|
||||||
|
$(CONTAINER_BUILD_OPTS) \
|
||||||
-t $(CI_IMAGE_TAG) \
|
-t $(CI_IMAGE_TAG) \
|
||||||
-f $(CONTAINER_CONFIG_DIR)/Dockerfile .
|
-f $(CONTAINER_CONFIG_DIR)/Dockerfile .
|
||||||
@$(CONTAINER_CMD) inspect -f '{{.Id}}' $(CI_IMAGE_TAG) > $(BUILDFILE)
|
@$(CONTAINER_CMD) inspect -f '{{.Id}}' $(CI_IMAGE_TAG) > $(BUILDFILE)
|
||||||
|
|
Loading…
Reference in New Issue