doll: --restart=unless-stopped

This commit is contained in:
xiongdian.me 2023-11-10 18:05:28 +08:00
parent 9766b40796
commit a28906c1d7

View File

@ -21,5 +21,5 @@ if [[ -z "$IMAGE" ]]; then
fmt_fatal "image not found" fmt_fatal "image not found"
else else
fmt_note "--> ${IMAGE_META[@]}" fmt_note "--> ${IMAGE_META[@]}"
$SUDO docker run ${2:+"--name"} $2 -itd $IMAGE sh $SUDO docker run ${2:+"--name"} $2 -itd --restart=unless-stopped $IMAGE sh
fi fi