This repository has been archived on 2024-06-06. You can view files and clone it, but cannot push or open issues or pull requests.
aur-builder/create-containers.sh
2023-07-28 17:04:56 +02:00

35 lines
988 B
Bash
Executable File

#!/usr/bin/env sh
# read variables from file
eval "$(cat variables)"
# Create a multi-architecture manifest
buildah manifest create ${MANIFEST_NAME}
# Build your amd64 architecture container
buildah bud \
--tag "${REGISTRY}/${USER}/${IMAGE_NAME}:${IMAGE_TAG}" \
--tag "${REGISTRY}/${USER}/${IMAGE_NAME}:latest" \
--manifest ${MANIFEST_NAME} \
--file ${AMD64_FILE} \
--arch amd64
# Build your arm64 architecture container
buildah bud \
--tag "${REGISTRY}/${USER}/${IMAGE_NAME}:${IMAGE_TAG}" \
--tag "${REGISTRY}/${USER}/${IMAGE_NAME}:latest" \
--manifest ${MANIFEST_NAME} \
--file ${ARM64_FILE} \
--arch arm64
# Push the full manifest, with both CPU Architectures
buildah manifest push --all \
${MANIFEST_NAME} \
"docker://${REGISTRY}/${USER}/${IMAGE_NAME}:${IMAGE_TAG}"
buildah manifest push --all \
${MANIFEST_NAME} \
"docker://${REGISTRY}/${USER}/${IMAGE_NAME}:latest"
# remove manifest
buildah manifest rm ${MANIFEST_NAME}