mirror of
https://github.com/eduardogsilva/routerfleet.git
synced 2025-07-25 21:34:33 +02:00
37 lines
780 B
Bash
37 lines
780 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
IMAGES=(
|
||
|
"eduardosilva/routerfleet:latest"
|
||
|
"eduardosilva/routerfleet-monitoring:latest"
|
||
|
"eduardosilva/routerfleet-nginx:latest"
|
||
|
"eduardosilva/routerfleet-cron: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."
|