To build and push all images to it's own repository.
- Configure you system to use Docker Buildx.
- Prepare crosscompile environment (see below).
In order to work in Arch Linux the following initialization commands will be required:
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker buildx rm multibuilder
docker buildx create --name multibuilder --platform linux/amd64,linux/arm64,linux/arm/v7,linux/s390x,linux/ppc64le --driver docker-container --use
docker buildx inspect --bootstrap
In order to modify the image name or any other configurable parameter run the generate.sh
script.
IMAGE_NAME="prodrigestivill/postgres-backup-local" ./generate.sh config.hcl
In order to only build the images locally run the following command:
docker buildx bake --pull -f config.hcl
In order to publish directly to the repository run this command instead:
docker buildx bake --pull --push -f config.hcl
Also, optionally, it can also generate build revision tags from last git commit (like ./publish.sh
script does):
BUILDREV=$(git rev-parse --short HEAD) docker buildx bake --pull --push -f config.hcl