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 162 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 859 days ago