Switch between docker/podman commands automatically
This commit is contained in:
parent
615aee34b7
commit
2a4b6ed116
1 changed files with 9 additions and 3 deletions
|
@ -4,9 +4,15 @@ set -e
|
|||
|
||||
[ -z "$1" ] && exit 1
|
||||
|
||||
docker build $1 -t gitea.angry.im/petercxy/$1:latest
|
||||
docker push gitea.angry.im/petercxy/$1:latest
|
||||
DOCKER=docker
|
||||
|
||||
if ! command -v $DOCKER &> /dev/null; then
|
||||
DOCKER=podman
|
||||
fi
|
||||
|
||||
$DOCKER build $1 -t gitea.angry.im/petercxy/$1:latest
|
||||
$DOCKER push gitea.angry.im/petercxy/$1:latest
|
||||
|
||||
while ! [ "$?" -eq 0 ]; do
|
||||
docker push gitea.angry.im/petercxy/$1:latest
|
||||
$DOCKER push gitea.angry.im/petercxy/$1:latest
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue