mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-14 11:57:51 +00:00
ed5a259eaa
Make it possible to specify an image build tool other than docker - a limitation is that the build tool must be compatible with docker files, of course. This makes it possible to build an NFD image without the Docker daemon, for example. The image build command is specified in a makefile variable and can be overridden from command line, for example: $ make IMAGE_BUILD_CMD="buildah bud" Thanks: Zvonko Kosic for suggesting this
23 lines
734 B
Makefile
23 lines
734 B
Makefile
.PHONY: all
|
|
|
|
IMAGE_BUILD_CMD := docker build
|
|
|
|
QUAY_DOMAIN_NAME := quay.io
|
|
QUAY_REGISTRY_USER := kubernetes_incubator
|
|
DOCKER_IMAGE_NAME := node-feature-discovery
|
|
|
|
VERSION := $(shell git describe --tags --dirty --always)
|
|
|
|
all: image
|
|
|
|
# To override QUAY_REGISTRY_USER use the -e option as follows:
|
|
# QUAY_REGISTRY_USER=<my-username> make docker -e.
|
|
image:
|
|
$(IMAGE_BUILD_CMD) --build-arg NFD_VERSION=$(VERSION) \
|
|
--build-arg http_proxy=$(http_proxy) \
|
|
--build-arg HTTP_PROXY=$(HTTP_PROXY) \
|
|
--build-arg https_proxy=$(https_proxy) \
|
|
--build-arg HTTPS_PROXY=$(HTTPS_PROXY) \
|
|
--build-arg no_proxy=$(no_proxy) \
|
|
--build-arg NO_PROXY=$(NO_PROXY) \
|
|
-t $(QUAY_DOMAIN_NAME)/$(QUAY_REGISTRY_USER)/$(DOCKER_IMAGE_NAME):$(VERSION) ./
|