1
0
Fork 0
docker-easy-haproxy/build-multiarch.sh
Joao Gilberto Magalhaes 48f6e1f783 Migrate build assets and scripts to deploy/docker structure
- Removed `install.sh` and moved Docker-related assets to `deploy/docker`.
- Updated all Dockerfile references from `build/` to `deploy/docker/`.
- Refactored paths in E2E tests, Makefile, and documentation for consistency with new directory structure.
- Added `HAPROXY_STATS_CORS_ORIGIN` environment variable in `docker-compose.yml`.
2026-02-18 02:58:32 -05:00

31 lines
1.4 KiB
Bash
Executable file

#!/bin/bash
set -e
# Start k8s-ci before run this command
# docker run --privileged -v /tmp/z:/var/lib/containers -it --rm -v $PWD:/work -w /work byjg/k8s-ci
if [ -z "$DOCKER_USERNAME" ] || [ -z "$DOCKER_PASSWORD" ] || [ -z "$DOCKER_REGISTRY" ] || [ -z "$VERSIONS" ]
then
echo You need to setup \$DOCKER_USERNAME, \$DOCKER_PASSWORD, \$DOCKER_REGISTRY and \$VERSIONS before run this command.
exit 1
fi
buildah login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD $DOCKER_REGISTRY
podman run --rm --events-backend=file --cgroup-manager=cgroupfs --privileged docker://multiarch/qemu-user-static --reset -p yes
for VERSION in $VERSIONS
do
DOCKERFILE=deploy/docker/Dockerfile
buildah manifest create byjg/easy-haproxy:$VERSION
buildah bud --arch arm64 --os linux --iidfile /tmp/iid-arm64 -f $DOCKERFILE --build-arg=RELEASE_VERSION_ARG="$VERSION-manual" -t byjg/easy-haproxy:$VERSION-arm64 .
buildah bud --arch amd64 --os linux --iidfile /tmp/iid-amd64 -f $DOCKERFILE --build-arg=RELEASE_VERSION_ARG="$VERSION-manual" -t byjg/easy-haproxy:$VERSION-amd64 .
buildah manifest add byjg/easy-haproxy:$VERSION --arch arm64 --os linux --variant v8 $(cat /tmp/iid-arm64)
buildah manifest add byjg/easy-haproxy:$VERSION --arch amd64 --os linux --os=linux $(cat /tmp/iid-amd64)
buildah manifest push --all --format v2s2 byjg/easy-haproxy:$VERSION docker://byjg/easy-haproxy:$VERSION
done