Skip to content

Commit 0f9ac93

Browse files
Merge pull request #4249 from ggiguash/fix_skopeo_fallback
USHIFT-5083: Always use qualified commit references in bootc kickstart
2 parents c1f5947 + abe529c commit 0f9ac93

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

test/bin/scenario.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,15 @@ prepare_kickstart() {
260260
exit 1
261261
fi
262262

263+
# For bootc kickstart templates, make sure that commit references are
264+
# fully qualified. Unqualified references are assumed to be served from
265+
# the local mirror registry.
266+
if [[ "${template}" == *bootc* ]] ; then
267+
if [ "$(dirname "${boot_commit_ref}")" == "." ] ; then
268+
boot_commit_ref="${MIRROR_REGISTRY_URL}/${boot_commit_ref}"
269+
fi
270+
fi
271+
263272
mkdir -p "${output_dir}"
264273
for ifile in "${KICKSTART_TEMPLATE_DIR}/${template}" "${KICKSTART_TEMPLATE_DIR}"/includes/*.cfg ; do
265274
local output_file

test/kickstart-templates/includes/main-ostreecontainer.cfg

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
# Configure support of pulling images both from a local mirror and remote registries.
2-
# Note: skopeo falls back to 'docker.io/library' prefix when specifying unqualified
3-
# image names. These need to be redirected to the local mirror location.
1+
# Configure support of pulling images both from a local mirror and remote registries
42
%pre-install --log=/dev/console --erroronfail
53

64
mkdir -p /etc/containers/registries.conf.d
75
# Enable insecure registry access from the hypervisor to allow local image pull.
86
# See https://github.com/containers/bootc/blob/main/docs/src/registries-and-offline.md#insecure-registries
97
cat > /etc/containers/registries.conf.d/998-microshift-bootc-registry.conf <<'EOF'
108
[[registry]]
11-
prefix = "docker.io/library"
9+
prefix = ""
1210
location = "REPLACE_BOOTC_REGISTRY_URL"
1311
insecure = true
1412
EOF

0 commit comments

Comments
 (0)