set -e REGISTRY="git.eplg.services" NAMESPACE="pterodactylimages" DIRS=( "apps/uptimekuma" "bot/bastion" "bot/parkertron" "bot/red" "bot/sinusbot" "box64" "bun/canary" "bun/latest" "cassandra/java11_python3" "cassandra/java8_python2" "dart/2.17" "dart/2.18" "dart/2.19" "dart/3.3" "dart/stable" "dotnet/2.1" "dotnet/3.1" "dotnet/5" "dotnet/6" "dotnet/7" "dotnet/8" "dotnet/9" "elixir/1.12" "elixir/1.13" "elixir/1.14" "elixir/1.15" "elixir/latest" "erlang/22" "erlang/23" "erlang/24" "erlang/25" "erlang/26" "games/altv" "games/arma3" "games/dayz" "games/minetest" "games/mohaa" "games/mta" "games/rust" "games/samp" "games/source" "games/thebattleforwesnoth" "games/valheim" "go/1.14" "go/1.15" "go/1.16" "go/1.17" "go/1.18" "go/1.19" "go/1.20" "go/1.21" "go/1.22" "go/1.23" "installers/alpine" "installers/debian" "installers/ubuntu" "java/11" "java/11j9" "java/16" "java/16j9" "java/17" "java/19" "java/21" "java/22" "java/8" "java/8j9" "mariadb/10.3" "mariadb/10.4" "mariadb/10.5" "mariadb/10.6" "mariadb/10.7" "mariadb/11.2" "mariadb/11.3" "mariadb/11.4" "mariadb/11.5" "mariadb/11.6" "mongodb/4" "mongodb/5" "mongodb/6" "mongodb/7" "mono/latest" "nodejs/12" "nodejs/14" "nodejs/16" "nodejs/17" "nodejs/18" "nodejs/19" "nodejs/20" "nodejs/21" "nodejs/22" "nodejs/23" "oses/alpine" "oses/debian" "oses/ubuntu" "postgres/10" "postgres/11" "postgres/12" "postgres/13" "postgres/14" "postgres/16" "postgres/9" "python/2.7" "python/3.10" "python/3.11" "python/3.12" "python/3.13" "python/3.7" "python/3.8" "python/3.9" "redis/5" "redis/6" "redis/7" "rust/1.56" "rust/1.60" "rust/latest" "steamcmd/debian" "steamcmd/dotnet" "steamcmd/proton" "steamcmd/proton_8" "steamcmd/sniper" "steamcmd/ubuntu" "voice/mumble" "voice/teaspeak" "wine/10" "wine/7" "wine/8" "wine/9" "wine/devel" "wine/latest" "wine/staging" ) for DIR in "${DIRS[@]}"; do IMAGE_NAME=$(echo "$DIR" | tr '/' '-') IMAGE_REF="$REGISTRY/$NAMESPACE/$IMAGE_NAME" echo "Building $DIR as $IMAGE_REF..." DOCKERFILE_DIR="$(dirname "$DIR/Dockerfile")" if [ -f "$(dirname "$DIR")/entrypoint.sh" ] && [ ! -f "$DOCKERFILE_DIR/entrypoint.sh" ]; then cp "$(dirname "$DIR")/entrypoint.sh" "$DOCKERFILE_DIR/" COPIED_ENTRYPOINT=true else COPIED_ENTRYPOINT=false fi docker build -t "$IMAGE_REF" -f "$DIR/Dockerfile" "$DOCKERFILE_DIR" if [ "$COPIED_ENTRYPOINT" = true ]; then rm "$DOCKERFILE_DIR/entrypoint.sh" fi echo "Pushing $IMAGE_REF..." docker push "$IMAGE_REF" echo "Successfully built and pushed $IMAGE_REF" echo "----------------------------------------" done echo "All images built and pushed successfully!"