Files
cc/start
2025-09-26 16:27:40 -03:00

16 lines
312 B
Bash
Executable File

#!/bin/bash
SERVICE_NAME="alpine"
# Check if the container is running
RUNNING=$(docker compose ps -q $SERVICE_NAME)
if [ -z "$RUNNING" ]; then
echo "Container not running. Starting..."
docker compose up -d $SERVICE_NAME
fi
# Connect to the running container
docker compose exec -it $SERVICE_NAME sh