Files
docker/latex/build-image.sh
Janis Hutz c74f1ed446
All checks were successful
Create and publish container / build_container (push) Successful in 9s
Build script fixes
2025-12-23 07:35:55 +01:00

18 lines
393 B
Bash
Executable File

#!/bin/sh
echo "Build will be tagged with $1"
echo "Build directory is $(pwd)"
OLD_IMG=$(docker image ls -q "$1")
docker buildx build . -t "$1"
echo "Build complete, starting upload..."
docker push "$1"
if [[ -n "$OLD_IMG" ]]; then
if [[ "$OLD_IMG" != "$(docker image ls -q "$1")" ]]; then
echo "New build uploaded, removing old image, id: $OLD_IMG"
docker image rm "$OLD_IMG"
fi
fi