Files
gupbot/build_gupbot.sh
2025-01-20 20:13:01 +00:00

23 lines
520 B
Bash
Executable File

#!/bin/bash
set -e
# Check if the container is running
if [ "$(docker ps -q -f name=gupbot)" ]; then
echo "Stopping the running container..."
docker stop gupbot
fi
# Check if the container exists (stopped or running)
if [ "$(docker ps -aq -f name=gupbot)" ]; then
echo "Removing the container..."
docker rm gupbot
fi
echo "Building the Docker image..."
docker build --network=host -t nalylab/gupbot .
echo "Running the Docker container..."
docker run --network=host --name=gupbot -d nalylab/gupbot