mirror of
https://github.com/certbot/certbot.git
synced 2026-01-26 07:41:33 +03:00
* generate multiarch images for non-architecture tags * Update documentation related to multiarch Docker * Remove qemu and switch to build via buildkit * Move to multistage Dockerfile * refactor docker script arg parsing and fix merge bugs * removed unnecessary testing script and fixed function name * improved quoting in shell scripts --------- Co-authored-by: humanoid2050 <humanoid2050@monolith> Co-authored-by: Brad Warren <bmw@users.noreply.github.com> Co-authored-by: humanoid2050 <humanoid2050@katana> Co-authored-by: Brad Warren <bmw@eff.org>
48 lines
1.6 KiB
Bash
Executable File
48 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
set -euxo pipefail
|
|
|
|
# This script generates multi-arch manifests for images previously pushed to
|
|
# Docker Hub via deploy_images.sh
|
|
|
|
# Usage:
|
|
# ./deploy_manifest.sh <TAG> all
|
|
# ./deploy_manifest.sh <TAG> <architectures>
|
|
# The <TAG> argument is an identifier applied to all docker images and manifests.
|
|
# It may be something like `nightly` or `v2.3.2`. If the tag is a version
|
|
# stamp greater than v2.0.0, then a `latest` tag will also be generated and
|
|
# pushed to the docker hub repo.
|
|
# The argument "all" will push all know architectures. Alternatively, the
|
|
# user may provide a comma separated list of architectures drawn from the
|
|
# known architectures. Know architectures include amd64, arm32v6, and arm64v8.
|
|
|
|
|
|
source "$(realpath $(dirname ${BASH_SOURCE[0]}))/lib/common"
|
|
|
|
ParseArgs "$@"
|
|
|
|
#jump to root, matching popd handed by Cleanup on EXIT via trap
|
|
pushd "${REPO_ROOT}"
|
|
|
|
# Set trap here, as the popd won't work as expected if invoked prior to pushd
|
|
trap popd EXIT
|
|
|
|
REGISTRY_SPEC="${DOCKER_HUB_ORG}/"
|
|
|
|
DeployManifest() {
|
|
IMAGE_NAME=$1
|
|
|
|
SRC_IMAGES=""
|
|
for TAG_ARCH in "${REQUESTED_ARCH_ARRAY[@]}"; do
|
|
SRC_IMAGES+="${REGISTRY_SPEC}${IMAGE_NAME}:${TAG_ARCH}-${TAG_VER} "
|
|
done
|
|
docker buildx imagetools create -t "${REGISTRY_SPEC}${IMAGE_NAME}:${TAG_VER}" $SRC_IMAGES
|
|
|
|
if [[ "${TAG_VER}" =~ ^v([2-9]|[1-9][0-9]+)\.[0-9]+\.[0-9]+$ ]]; then
|
|
docker buildx imagetools create -t "${REGISTRY_SPEC}${IMAGE_NAME}:latest" $SRC_IMAGES
|
|
fi
|
|
}
|
|
|
|
DeployManifest certbot
|
|
for PLUGIN in "${CERTBOT_PLUGINS[@]}"; do
|
|
DeployManifest "$PLUGIN"
|
|
done |