Docker init
This commit is contained in:
12
docker/stop.sh
Executable file
12
docker/stop.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
CONTAINER="ewc2025-mysql"
|
||||
|
||||
if ! docker ps -a --format '{{.Names}}' | grep -q "^${CONTAINER}$"; then
|
||||
echo "Container '${CONTAINER}' does not exist."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
docker stop "${CONTAINER}"
|
||||
echo "Container '${CONTAINER}' stopped. Data volume preserved."
|
||||
Reference in New Issue
Block a user