'Generic Commit'
This commit is contained in:
@ -6,18 +6,10 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||
|
||||
PROJECT="dropshell-build-base"
|
||||
|
||||
# Create buildx builder if it doesn't exist
|
||||
if ! docker buildx ls | grep -q "${PROJECT}-multiarch"; then
|
||||
docker buildx create --name ${PROJECT}-multiarch --use \
|
||||
--driver-opt env.BUILDKIT_MAX_PARALLELISM=4
|
||||
else
|
||||
docker buildx use ${PROJECT}-multiarch
|
||||
fi
|
||||
ARCH=$(uname -m)
|
||||
|
||||
# Build multi-platform image and push it
|
||||
docker buildx build \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
--push \
|
||||
docker build \
|
||||
-t "gitea.jde.nz/public/dropshell-build-base:test" \
|
||||
-f "${SCRIPT_DIR}/Dockerfile.dropshell-build-base" \
|
||||
${SCRIPT_DIR}
|
||||
|
@ -6,18 +6,15 @@ set -euo pipefail
|
||||
#[[ -n $SOS_WRITE_TOKEN ]] || die "SOS_WRITE_TOKEN not specified"
|
||||
#[[ -n $DOCKER_PUSH_TOKEN ]] || die "DOCKER_PUSH_TOKEN not specified"
|
||||
|
||||
ARCH=$(uname -m)
|
||||
|
||||
echo "Publishing dropshell-build-base:test as :latest..."
|
||||
echo "Publishing dropshell-build-base:test as :latest-${ARCH}..."
|
||||
|
||||
# Pull the multiarch manifest from :test tag
|
||||
docker buildx imagetools create \
|
||||
--tag gitea.jde.nz/public/dropshell-build-base:latest \
|
||||
--tag gitea.jde.nz/public/dropshell-build-base:latest-${ARCH} \
|
||||
gitea.jde.nz/public/dropshell-build-base:test
|
||||
|
||||
echo "Successfully tagged dropshell-build-base:test as :latest"
|
||||
echo "Successfully tagged dropshell-build-base:test as :latest-${ARCH}"
|
||||
|
||||
# Show the manifest to confirm it's multiarch
|
||||
echo ""
|
||||
echo "Verifying multiarch manifest:"
|
||||
docker buildx imagetools inspect gitea.jde.nz/public/dropshell-build-base:latest
|
||||
|
||||
|
Reference in New Issue
Block a user