mirror of
https://github.com/lukaszraczylo/kubernetes-images-sync-operator.git
synced 2026-07-08 03:54:26 +00:00
Update makefile to produce consistent output for amd64 images.
This commit is contained in:
@@ -117,22 +117,14 @@ PLATFORMS ?= linux/arm64,linux/amd64
|
|||||||
docker-buildx: ## Build and push docker image for the manager for cross-platform support
|
docker-buildx: ## Build and push docker image for the manager for cross-platform support
|
||||||
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
|
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
|
||||||
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
|
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
|
||||||
- $(CONTAINER_TOOL) buildx create --name kubernetes-images-sync-operator-builder
|
|
||||||
$(CONTAINER_TOOL) buildx use kubernetes-images-sync-operator-builder
|
|
||||||
- $(CONTAINER_TOOL) buildx build --push --platform=$(PLATFORMS) --build-arg IMAGE_VERSION_TAG=${CURRENT_VERSION} --tag ${IMG}:${CURRENT_VERSION} -f Dockerfile.cross .
|
- $(CONTAINER_TOOL) buildx build --push --platform=$(PLATFORMS) --build-arg IMAGE_VERSION_TAG=${CURRENT_VERSION} --tag ${IMG}:${CURRENT_VERSION} -f Dockerfile.cross .
|
||||||
- $(CONTAINER_TOOL) buildx rm kubernetes-images-sync-operator-builder
|
|
||||||
rm Dockerfile.cross
|
rm Dockerfile.cross
|
||||||
|
|
||||||
|
|
||||||
.PHONY: docker-buildx-job-container
|
.PHONY: docker-buildx-job-container
|
||||||
docker-buildx-job-container: ## Build and push docker image for the manager for cross-platform support
|
docker-buildx-job-container: ## Build and push docker image for the manager for cross-platform support
|
||||||
@cd docker-image-worker && ( \
|
@cd docker-image-worker && ( \
|
||||||
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross && \
|
$(CONTAINER_TOOL) buildx build --push --platform=$(PLATFORMS) --build-arg IMAGE_VERSION_TAG=${CURRENT_VERSION} --tag ${IMG_WORKER}:${CURRENT_VERSION} -f Dockerfile . \
|
||||||
$(CONTAINER_TOOL) buildx create --name kubernetes-images-sync-operator-builder || true && \
|
|
||||||
$(CONTAINER_TOOL) buildx use kubernetes-images-sync-operator-builder && \
|
|
||||||
$(CONTAINER_TOOL) buildx build --push --platform=$(PLATFORMS) --build-arg IMAGE_VERSION_TAG=${CURRENT_VERSION} --tag ${IMG_WORKER}:${CURRENT_VERSION} -f Dockerfile.cross . && \
|
|
||||||
$(CONTAINER_TOOL) buildx rm kubernetes-images-sync-operator-builder || true && \
|
|
||||||
rm Dockerfile.cross \
|
|
||||||
) && cd ..
|
) && cd ..
|
||||||
|
|
||||||
.PHONY: build-installer
|
.PHONY: build-installer
|
||||||
@@ -220,6 +212,9 @@ helm: manifests kustomize helmify
|
|||||||
cp chart-defaults/Chart.yaml chart/Chart.yaml && \
|
cp chart-defaults/Chart.yaml chart/Chart.yaml && \
|
||||||
./update-version.sh $(CURRENT_VERSION) $(IMG)
|
./update-version.sh $(CURRENT_VERSION) $(IMG)
|
||||||
|
|
||||||
|
.PHONY: docker-containers
|
||||||
|
docker-containers: docker-buildx docker-buildx-job-container
|
||||||
|
|
||||||
.PHONY: release # Generates helm chart, builds docker images and pushes them to the registry
|
.PHONY: release # Generates helm chart, builds docker images and pushes them to the registry
|
||||||
release: helm docker-buildx docker-buildx-job-container release-chart
|
release: helm docker-buildx docker-buildx-job-container release-chart
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user