Skip to content

Commit ea60e67

Browse files
committed
improve docs
1 parent af75a6d commit ea60e67

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

images/image_config.sh

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ BOT_IMAGE_NAME="tmp-bot"
1818
BASE_TAG="0.2"
1919
BASE_IMAGE_CONDAFORGE_AMD64="quay.io/condaforge/linux-anvil-x86_64:cos7"
2020
BASE_IMAGE_CONDAFORGE_ARM64="quay.io/condaforge/linux-anvil-aarch64:cos7"
21+
22+
# May be set within loops sourcing this script, in which case respect it
2123
CURRENT_ARCH=${CURRENT_ARCH:-""}
2224

2325
# Inspect this repo to get the currently-checked-out version, which matches
@@ -72,24 +74,24 @@ function tag_exists() {
7274
}
7375

7476
function build_and_push_manifest() {
75-
# Creates a local manifest, adds containers for multiple archs, and pushes to
76-
# a registry.
77+
# Creates a local manifest, pull containers for multiple archs, adds them to
78+
# the manifest, and pushes the manifest & images to a registry.
7779
#
7880
# build_and_push_manifest <source> <dest> <podman manifest push args> <use_arch_suffix>
7981
#
8082
# (last two args are optional)
8183
#
8284
# For pushing to a local registry:
8385
#
84-
# build_and_push_manifest ${BASE_BUSYBOX_IMAGE_NAME}:${BASE_TAG} docker://localhost:5000 ${BASE_BUSYBOX_IMAGE_NAME}:${BASE_TAG} "--tls-verify=false"
86+
# build_and_push_manifest image:tag docker://localhost:5000/image:tag "--tls-verify=false"
8587
#
8688
# For pushing the manifest from local images to quay.io:
8789
#
88-
# build_and_push_manifest ${BASE_BUSYBOX_IMAGE_NAME}:${BASE_TAG} quay.io/bioconda/${BASE_BUSYBOX_IMAGE_NAME}:latest
90+
# build_and_push_manifest image:tag quay.io/bioconda/image:master
8991
#
90-
# For re-tagging a manifest (with its component images):
92+
# For re-tagging a manifest already on quay.io (with its component images):
9193
#
92-
# build_and_push_manifest ${BASE_BUSYBOX_IMAGE_NAME}:${BASE_TAG} quay.io/bioconda/${BASE_BUSYBOX_IMAGE_NAME}:latest "" "false"
94+
# build_and_push_manifest quay.io/bioconda/image:master quay.io/bioconda/image:latest "" "false"
9395
local source=$1
9496
local dest=$2
9597
local additional_args=${3:-""}
@@ -109,6 +111,12 @@ function build_and_push_manifest() {
109111
# skip non-amd64 if configured
110112
[ "${ONLY_AMD64:-false}" == "true" -a "${arch}" != "amd64" ] && continue
111113

114+
# When first creating a manifest, we have local images that have
115+
# arch-specific suffixes so use the default, "true".
116+
#
117+
# However, when re-tagging a manifest already on quay.io, the arch-specific
118+
# images are inside the manifest and do not have arch-specific suffixes, so
119+
# use "false".
112120
if [ $use_arch_suffix == "true" ]; then
113121
imgid=$(buildah pull --arch=$arch "${source}-${arch}")
114122
else

0 commit comments

Comments
 (0)