#!/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

