working
This commit is contained in:
15
start
15
start
@@ -1,2 +1,15 @@
|
||||
#!/bin/bash
|
||||
docker compose run alpine /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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user