https://github.com/cilium/cilium
Tip revision: 95d8778dbfc319e20162333116c4e962c2772f5f authored by Joe Stringer on 05 November 2021, 22:51:14 UTC
Prepare for release v1.9.11
Prepare for release v1.9.11
Tip revision: 95d8778
Makefile.docker
# Copyright 2017-2020 Authors of Cilium
# SPDX-License-Identifier: Apache-2.0
UTC_DATE=$(shell date -u "+%Y-%m-%d")
DOCKER_REGISTRY ?= quay.io
docker-cilium-image-for-developers:
# DOCKER_BUILDKIT allows for faster build as well as the ability to use
# a dedicated dockerignore file per Dockerfile.
$(QUIET)DOCKER_BUILDKIT=1 $(CONTAINER_ENGINE) build \
$(DOCKER_FLAGS) \
--build-arg LOCKDEBUG=${RACE}\
--build-arg RACE=${RACE}\
--build-arg V=\
--build-arg LIBNETWORK_PLUGIN=\
-t $(DOCKER_DEV_ACCOUNT)/cilium-dev:latest . -f ./cilium-dev.Dockerfile
docker-images-all: docker-cilium-image docker-plugin-image docker-hubble-relay-image docker-clustermesh-apiserver-image docker-operator-images-all
docker-images-all-unstripped: docker-cilium-image-unstripped docker-plugin-image-unstripped docker-hubble-relay-image-unstripped docker-clustermesh-apiserver-image-unstripped docker-operator-images-all-unstripped
docker-operator-images-all: docker-operator-image docker-operator-aws-image docker-operator-azure-image docker-operator-generic-image
docker-operator-images-all-unstripped: docker-operator-image-unstripped docker-operator-aws-image-unstripped docker-operator-azure-image-unstripped docker-operator-generic-image-unstripped
docker-cilium-image: GIT_VERSION $(BUILD_DIR)/Dockerfile build-context-update
$(QUIET)$(CONTAINER_ENGINE) build -f $(BUILD_DIR)/Dockerfile \
$(DOCKER_FLAGS) \
--build-arg NOSTRIP=${NOSTRIP} \
--build-arg LOCKDEBUG=${LOCKDEBUG} \
--build-arg RACE=${RACE}\
--build-arg V=${V} \
--build-arg LIBNETWORK_PLUGIN=${LIBNETWORK_PLUGIN} \
--build-arg CILIUM_SHA=$(firstword $(GIT_VERSION)) \
-t cilium/cilium$(UNSTRIPPED):$(DOCKER_IMAGE_TAG) $(DOCKER_BUILD_DIR)
$(QUIET)$(CONTAINER_ENGINE) tag cilium/cilium$(UNSTRIPPED):$(DOCKER_IMAGE_TAG) cilium/cilium$(UNSTRIPPED):$(DOCKER_IMAGE_TAG)-${GOARCH}
$(QUIET)$(CONTAINER_ENGINE) tag cilium/cilium$(UNSTRIPPED):$(DOCKER_IMAGE_TAG) $(DOCKER_REGISTRY)/cilium/cilium$(UNSTRIPPED):$(DOCKER_IMAGE_TAG)
@echo "Push like this when ready:"
@echo "${CONTAINER_ENGINE} push cilium/cilium$(UNSTRIPPED):$(DOCKER_IMAGE_TAG)-${GOARCH}"
docker-cilium-image-unstripped: NOSTRIP=1
docker-cilium-image-unstripped: UNSTRIPPED=-unstripped
docker-cilium-image-unstripped: docker-cilium-image
docker-cilium-manifest:
@$(ECHO_CHECK) contrib/scripts/push_manifest.sh cilium $(DOCKER_IMAGE_TAG)
$(QUIET) contrib/scripts/push_manifest.sh cilium $(DOCKER_IMAGE_TAG)
dev-docker-image: GIT_VERSION $(BUILD_DIR)/Dockerfile build-context-update
$(QUIET)$(CONTAINER_ENGINE) build -f $(BUILD_DIR)/Dockerfile \
$(DOCKER_FLAGS) \
--build-arg NOSTRIP=${NOSTRIP} \
--build-arg LOCKDEBUG=${LOCKDEBUG} \
--build-arg RACE=${RACE}\
--build-arg V=${V} \
--build-arg CILIUM_SHA=$(firstword $(GIT_VERSION)) \
--build-arg LIBNETWORK_PLUGIN=${LIBNETWORK_PLUGIN} \
-t $(DOCKER_DEV_ACCOUNT)/cilium-dev$(UNSTRIPPED):$(DOCKER_IMAGE_TAG) $(DOCKER_BUILD_DIR)
$(QUIET)$(CONTAINER_ENGINE) tag $(DOCKER_DEV_ACCOUNT)/cilium-dev$(UNSTRIPPED):$(DOCKER_IMAGE_TAG) $(DOCKER_DEV_ACCOUNT)/cilium-dev$(UNSTRIPPED):$(DOCKER_IMAGE_TAG)
@echo "Push like this when ready:"
@echo "${CONTAINER_ENGINE} push $(DOCKER_DEV_ACCOUNT)/cilium-dev$(UNSTRIPPED):$(DOCKER_IMAGE_TAG)-${GOARCH}"
dev-docker-image-unstripped: NOSTRIP=1
dev-docker-image-unstripped: UNSTRIPPED=-unstripped
dev-docker-image-unstripped: dev-docker-image
docker-cilium-dev-manifest:
@$(ECHO_CHECK) contrib/scripts/push_manifest.sh cilium-dev $(DOCKER_IMAGE_TAG)
$(QUIET) contrib/scripts/push_manifest.sh cilium-dev $(DOCKER_IMAGE_TAG)
# Build cilium-operator images.
# We eat the ending of "operator" in to the stem ('%') to allow this pattern
# to build also 'docker-operator-image', where the stem would be empty otherwise
docker-opera%-image: GIT_VERSION $(BUILD_DIR)/cilium-opera%.Dockerfile build-context-update
$(QUIET)$(CONTAINER_ENGINE) build \
$(DOCKER_FLAGS) \
--build-arg BASE_IMAGE=${BASE_IMAGE} \
--build-arg NOSTRIP=${NOSTRIP} \
--build-arg LOCKDEBUG=${LOCKDEBUG} \
--build-arg RACE=${RACE}\
--build-arg CILIUM_SHA=$(firstword $(GIT_VERSION)) \
-f $(BUILD_DIR)/cilium-opera$*.Dockerfile \
-t cilium/opera$*$(UNSTRIPPED):$(DOCKER_IMAGE_TAG) $(DOCKER_BUILD_DIR)
$(QUIET)$(CONTAINER_ENGINE) tag cilium/opera$*$(UNSTRIPPED):$(DOCKER_IMAGE_TAG) cilium/opera$*$(UNSTRIPPED):$(DOCKER_IMAGE_TAG)-${GOARCH}
$(QUIET)$(CONTAINER_ENGINE) tag cilium/opera$*$(UNSTRIPPED):$(DOCKER_IMAGE_TAG) $(DOCKER_REGISTRY)/cilium/opera$*$(UNSTRIPPED):$(DOCKER_IMAGE_TAG)
@echo "Push like this when ready:"
@echo "${CONTAINER_ENGINE} push cilium/opera$*$(UNSTRIPPED):$(DOCKER_IMAGE_TAG)-${GOARCH}"
docker-operator-image-unstripped: NOSTRIP=1
docker-operator-image-unstripped: UNSTRIPPED=-unstripped
docker-operator-image-unstripped: docker-operator-image
docker-operator-manifest:
@$(ECHO_CHECK) contrib/scripts/push_manifest.sh operator $(DOCKER_IMAGE_TAG)
$(QUIET) contrib/scripts/push_manifest.sh operator $(DOCKER_IMAGE_TAG)
docker-plugin-image: GIT_VERSION $(BUILD_DIR)/cilium-docker-plugin.Dockerfile build-context-update
$(QUIET)$(CONTAINER_ENGINE) build \
$(DOCKER_FLAGS) \
--build-arg NOSTRIP=${NOSTRIP} \
--build-arg LOCKDEBUG=${LOCKDEBUG} \
--build-arg RACE=${RACE}\
--build-arg CILIUM_SHA=$(firstword $(GIT_VERSION)) \
-f $(BUILD_DIR)/cilium-docker-plugin.Dockerfile \
-t cilium/docker-plugin$(UNSTRIPPED):$(DOCKER_IMAGE_TAG) $(DOCKER_BUILD_DIR)
$(QUIET)$(CONTAINER_ENGINE) tag cilium/docker-plugin$(UNSTRIPPED):$(DOCKER_IMAGE_TAG) cilium/docker-plugin$(UNSTRIPPED):$(DOCKER_IMAGE_TAG)-${GOARCH}
$(QUIET)$(CONTAINER_ENGINE) tag cilium/docker-plugin$(UNSTRIPPED):$(DOCKER_IMAGE_TAG) $(DOCKER_REGISTRY)/cilium/docker-plugin$(UNSTRIPPED):$(DOCKER_IMAGE_TAG)
@echo "Push like this when ready:"
@echo "${CONTAINER_ENGINE} push cilium/docker-plugin$(UNSTRIPPED):$(DOCKER_IMAGE_TAG)-${GOARCH}"
docker-plugin-image-unstripped: NOSTRIP=1
docker-plugin-image-unstripped: UNSTRIPPED=-unstripped
docker-plugin-image-unstripped: docker-plugin-image
docker-plugin-manifest:
@$(ECHO_CHECK) contrib/scripts/push_manifest.sh docker-plugin $(DOCKER_IMAGE_TAG)
$(QUIET) contrib/scripts/push_manifest.sh docker-plugin $(DOCKER_IMAGE_TAG)
docker-image-runtime:
cd contrib/packaging/docker && $(CONTAINER_ENGINE) build $(DOCKER_FLAGS) --build-arg ARCH=$(GOARCH) -t cilium/cilium-runtime:$(UTC_DATE) -f Dockerfile.runtime .
$(QUIET)$(CONTAINER_ENGINE) tag cilium/cilium-runtime:$(UTC_DATE) cilium/cilium-runtime:$(UTC_DATE)-${GOARCH}
$(QUIET)$(CONTAINER_ENGINE) tag cilium/cilium-runtime:$(UTC_DATE) $(DOCKER_REGISTRY)/cilium/cilium-runtime:$(UTC_DATE)-${GOARCH}
docker-cilium-runtime-manifest:
@$(ECHO_CHECK) contrib/scripts/push_manifest.sh cilium-runtime $(UTC_DATE)
$(QUIET) contrib/scripts/push_manifest.sh cilium-runtime $(UTC_DATE)
docker-image-builder:
$(QUIET)$(CONTAINER_ENGINE) build $(DOCKER_FLAGS) --build-arg ARCH=$(GOARCH) -t cilium/cilium-builder:$(UTC_DATE) -f Dockerfile.builder .
$(QUIET)$(CONTAINER_ENGINE) tag cilium/cilium-builder:$(UTC_DATE) cilium/cilium-builder:$(UTC_DATE)-${GOARCH}
$(QUIET)$(CONTAINER_ENGINE) tag cilium/cilium-builder:$(UTC_DATE) $(DOCKER_REGISTRY)/cilium/cilium-builder:$(UTC_DATE)-${GOARCH}
docker-cilium-builder-manifest:
@$(ECHO_CHECK) contrib/scripts/push_manifest.sh cilium-builder $(UTC_DATE)
$(QUIET) contrib/scripts/push_manifest.sh cilium-builder $(UTC_DATE)
docker-hubble-relay-image: $(BUILD_DIR)/hubble-relay.Dockerfile build-context-update
$(QUIET)$(CONTAINER_ENGINE) build \
$(DOCKER_FLAGS) \
--build-arg BASE_IMAGE=${BASE_IMAGE} \
--build-arg NOSTRIP=${NOSTRIP} \
--build-arg LOCKDEBUG=${LOCKDEBUG} \
--build-arg RACE=${RACE}\
--build-arg CILIUM_SHA=$(firstword $(GIT_VERSION)) \
-f $(BUILD_DIR)/hubble-relay.Dockerfile \
-t cilium/hubble-relay$(UNSTRIPPED):$(DOCKER_IMAGE_TAG) $(DOCKER_BUILD_DIR)
$(QUIET)$(CONTAINER_ENGINE) tag cilium/hubble-relay$(UNSTRIPPED):$(DOCKER_IMAGE_TAG) cilium/hubble-relay$(UNSTRIPPED):$(DOCKER_IMAGE_TAG)-${GOARCH}
$(QUIET)$(CONTAINER_ENGINE) tag cilium/hubble-relay$(UNSTRIPPED):$(DOCKER_IMAGE_TAG) $(DOCKER_REGISTRY)/cilium/hubble-relay$(UNSTRIPPED):$(DOCKER_IMAGE_TAG)
@echo "Push like this when ready:"
@echo "${CONTAINER_ENGINE} push cilium/hubble-relay$(UNSTRIPPED):$(DOCKER_IMAGE_TAG)-${GOARCH}"
docker-hubble-relay-image-unstripped: NOSTRIP=1
docker-hubble-relay-image-unstripped: UNSTRIPPED=-unstripped
docker-hubble-relay-image-unstripped: docker-hubble-relay-image
docker-clustermesh-apiserver-image: $(BUILD_DIR)/clustermesh-apiserver.Dockerfile build-context-update
$(QUIET)$(CONTAINER_ENGINE) build \
$(DOCKER_FLAGS) \
--build-arg BASE_IMAGE=${BASE_IMAGE} \
--build-arg NOSTRIP=${NOSTRIP} \
--build-arg LOCKDEBUG=${LOCKDEBUG} \
--build-arg RACE=${RACE}\
--build-arg CILIUM_SHA=$(firstword $(GIT_VERSION)) \
-f $(BUILD_DIR)/clustermesh-apiserver.Dockerfile \
-t cilium/clustermesh-apiserver$(UNSTRIPPED):$(DOCKER_IMAGE_TAG) $(DOCKER_BUILD_DIR)
$(QUIET)$(CONTAINER_ENGINE) tag cilium/clustermesh-apiserver$(UNSTRIPPED):$(DOCKER_IMAGE_TAG) cilium/clustermesh-apiserver$(UNSTRIPPED):$(DOCKER_IMAGE_TAG)-${GOARCH}
$(QUIET)$(CONTAINER_ENGINE) tag cilium/clustermesh-apiserver$(UNSTRIPPED):$(DOCKER_IMAGE_TAG) $(DOCKER_REGISTRY)/cilium/clustermesh-apiserver$(UNSTRIPPED):$(DOCKER_IMAGE_TAG)
@echo "Push like this when ready:"
@echo "${CONTAINER_ENGINE} push cilium/clustermesh-apiserver$(UNSTRIPPED):$(DOCKER_IMAGE_TAG)-${GOARCH}"
docker-clustermesh-apiserver-image-unstripped: NOSTRIP=1
docker-clustermesh-apiserver-image-unstripped: UNSTRIPPED=-unstripped
docker-clustermesh-apiserver-image-unstripped: docker-clustermesh-apiserver-image
.PHONY: docker-image-runtime docker-image-builder docker-cilium-manifest docker-cilium-dev-manifest docker-operator-manifest docker-plugin-manifest docker-cilium-runtime-manifest docker-cilium-builder-manifest