Changed docker-compose to use the images from dockerhub.

This commit is contained in:
Eduardo Silva 2024-04-08 13:03:40 -03:00
parent cd97a65260
commit 2a3b99abe8
6 changed files with 66 additions and 19 deletions

36
build_and_push.sh Executable file
View file

@ -0,0 +1,36 @@
#!/bin/bash
IMAGES=(
"eduardosilva/wireguard_webadmin:latest"
"eduardosilva/wireguard_webadmin_cron:latest"
"eduardosilva/wireguard_webadmin_nginx:latest"
)
build_images() {
echo "Starting the build of the images..."
docker-compose -f docker-compose-build.yml build
if [ $? -eq 0 ]; then
echo "Build completed successfully."
else
echo "Error during the image build."
exit 1
fi
}
push_images() {
for IMAGE in "${IMAGES[@]}"; do
echo "Pushing image: $IMAGE..."
docker push "$IMAGE"
if [ $? -eq 0 ]; then
echo "$IMAGE pushed successfully."
else
echo "Error pushing the image: $IMAGE"
exit 1
fi
done
}
build_images
push_images
echo "Build and push operations completed successfully."