From 783f5ac712a20ea71412338a220c3a2a3e61c1ba Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 8 Jul 2024 17:09:57 +0200 Subject: [PATCH] Use registry image from ghcr.io. --- tests/images/copy-images.sh | 23 +++++++++++++++++++ .../targets/setup_docker/vars/main.yml | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100755 tests/images/copy-images.sh diff --git a/tests/images/copy-images.sh b/tests/images/copy-images.sh new file mode 100755 index 000000000..71a0c1d78 --- /dev/null +++ b/tests/images/copy-images.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +set -e + +# Uncomment the container image to copy, and run this script to copy it. + +DESTINATION_REPO=ansible-collections/community.docker + +function convert_image { + echo "=========================================================================================================" + local IMAGE_NAME="$1" + local DEST_IMAGE="$2" + echo "FROM ${IMAGE_NAME}" | podman build --annotation "org.opencontainers.image.source=https://github.com/${DESTINATION_REPO}" -t "ghcr.io/${DESTINATION_REPO}/${DEST_IMAGE}" - + podman push "ghcr.io/${DESTINATION_REPO}/${DEST_IMAGE}" + podman rmi "${IMAGE_NAME}" + podman rmi "ghcr.io/${DESTINATION_REPO}/${DEST_IMAGE}" +} + +# convert_image docker.io/library/registry:2.6.1 docker-distribution:2.6.1 +# convert_image docker.io/library/registry:2.8.3 docker-distribution:2.8.3 diff --git a/tests/integration/targets/setup_docker/vars/main.yml b/tests/integration/targets/setup_docker/vars/main.yml index c618fb9dc..cb731d450 100644 --- a/tests/integration/targets/setup_docker/vars/main.yml +++ b/tests/integration/targets/setup_docker/vars/main.yml @@ -15,7 +15,7 @@ docker_test_image_busybox: quay.io/ansible/docker-test-containers:busybox docker_test_image_alpine: quay.io/ansible/docker-test-containers:alpine3.8 docker_test_image_alpine_different: quay.io/ansible/docker-test-containers:alpine3.7 docker_test_image_registry_nginx: quay.io/ansible/docker-test-containers:nginx-alpine -docker_test_image_registry: registry:2.6.1 +docker_test_image_registry: ghcr.io/ansible-collections/community.docker/docker-distribution:2.8.3 docker_test_image_simple_1: ghcr.io/ansible-collections/simple-1:tag docker_test_image_simple_2: ghcr.io/ansible-collections/simple-2:tag docker_test_image_healthcheck: ghcr.io/ansible-collections/healthcheck:check