container_name="${1:-world}"
# check if the container exists
if docker ps -a | grep -q "$container_name"; then
echo "true"
else
echo "false"
fi
Submitted by hugo697 5 days ago
container_name="${1:-world}"
# check if the container exists
if docker ps -a | grep -q "$container_name"; then
echo "true"
else
echo "false"
fi
Submitted by yassinsiouda74165 702 days ago