mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-14 11:57:51 +00:00
607e95f290
Docker v17.07 and later supports configuring proxy servers via the docker client configuration (https://docs.docker.com/network/proxy/). This is better than using --build-args for passing the proxy settings to the build environment. Previously, we could end up with empty variables values which could cause the build to fail. E.g. if you had http_proxy=<myproxy> defined but HTTP_PROXY unset in the host environment, you ended up with http_proxy=<myproxy> and HTTP_PROXY="" (i.e. empty value) inside the build which caused problems in some cases. In addition, this makes builds via make and directly with docker more similar.
17 lines
492 B
Makefile
17 lines
492 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) \
|
|
-t $(QUAY_DOMAIN_NAME)/$(QUAY_REGISTRY_USER)/$(DOCKER_IMAGE_NAME):$(VERSION) ./
|