diff options
author | Christian M. Adams <chadams@redhat.com> | 2024-01-16 22:29:33 +0100 |
---|---|---|
committer | Dave <dmz.oneill@gmail.com> | 2024-02-14 17:01:36 +0100 |
commit | 40a8a3cb2fe6f14a79653c0bd91dab7644c4bc67 (patch) | |
tree | c302ff47ff8eb042a3166579bd54ee20864298d5 /Makefile | |
parent | GH13983 - Add additional check for bad templates (diff) | |
download | awx-40a8a3cb2fe6f14a79653c0bd91dab7644c4bc67.tar.xz awx-40a8a3cb2fe6f14a79653c0bd91dab7644c4bc67.zip |
Add dockerx make target for building awx for arm64
Signed-off-by: Christian M. Adams <chadams@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -586,6 +586,29 @@ docker-compose-build: Dockerfile.dev --build-arg BUILDKIT_INLINE_CACHE=1 \ --cache-from=$(DEV_DOCKER_TAG_BASE)/awx_devel:$(COMPOSE_TAG) . +# ## Build awx_devel image for docker compose development environment for multiple architectures +# docker-compose-buildx: Dockerfile.dev +# DOCKER_BUILDKIT=1 docker build \ +# -f Dockerfile.dev \ +# -t $(DEVEL_IMAGE_NAME) \ +# --build-arg BUILDKIT_INLINE_CACHE=1 \ +# --cache-from=$(DEV_DOCKER_TAG_BASE)/awx_devel:$(COMPOSE_TAG) . + +## Build awx_devel image for docker compose development environment for multiple architectures +# PLATFORMS defines the target platforms for the manager image be build to provide support to multiple +# architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to: +# - able to use docker buildx . More info: https://docs.docker.com/build/buildx/ +# - have enable BuildKit, More info: https://docs.docker.com/develop/develop-images/build_enhancements/ +# - be able to push the image for your registry (i.e. if you do not inform a valid value via IMG=<myregistry/image:<tag>> than the export will fail) +# To properly provided solutions that supports more than one platform you should use this option. +PLATFORMS ?= linux/amd64,linux/arm64 # linux/ppc64le,linux/s390x +.PHONY: docker-compose-buildx +docker-compose-buildx: Dockerfile.dev ## Build and push docker image for the manager for cross-platform support + - docker buildx create --name project-v3-builder + docker buildx use project-v3-builder + - docker buildx build --push $(BUILD_ARGS) --platform=$(PLATFORMS) --tag $(DEVEL_IMAGE_NAME) -f Dockerfile.dev . + - docker buildx rm project-v3-builder + docker-clean: -$(foreach container_id,$(shell docker ps -f name=tools_awx -aq && docker ps -f name=tools_receptor -aq),docker stop $(container_id); docker rm -f $(container_id);) -$(foreach image_id,$(shell docker images --filter=reference='*/*/*awx_devel*' --filter=reference='*/*awx_devel*' --filter=reference='*awx_devel*' -aq),docker rmi --force $(image_id);) |