Podman support
This commit is contained in:
@@ -3,10 +3,15 @@ set -euo pipefail
|
||||
|
||||
CONTAINER="ewc2025-mysql"
|
||||
|
||||
if ! docker ps -a --format '{{.Names}}' | grep -q "^${CONTAINER}$"; then
|
||||
RUNTIME="docker"
|
||||
if [[ "${1:-}" == "--podman" ]]; then
|
||||
RUNTIME="podman"
|
||||
fi
|
||||
|
||||
if ! ${RUNTIME} ps -a --format '{{.Names}}' | grep -q "^${CONTAINER}$"; then
|
||||
echo "Container '${CONTAINER}' does not exist."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
docker stop "${CONTAINER}"
|
||||
${RUNTIME} stop "${CONTAINER}"
|
||||
echo "Container '${CONTAINER}' stopped. Data volume preserved."
|
||||
|
||||
Reference in New Issue
Block a user