Hi @Lesedi Thanks for pointing this out to us!
We did find some issues with the run.sh file in the recent release. Please update the run.sh
and the docker-compose.yml
with the update scripts.
we are still making some quality of life updates and changes so hopfully we will have release out for this fix soon
run.sh
#!/bin/bash
IMAGE_NAME="sproutopia"
FORCE_BUILD=false
# Check for command-line argument to force build
while [[ "$#" -gt 0 ]]; do
case $1 in
-b|--build) FORCE_BUILD=true;;
*)
echo "Unknown parameter passed: $1"
echo "Usage: $0 [OPTION]"
echo "OPTIONS:"
echo " -b, --build force build of docker image even if it already exists"
exit 1;;
esac
shift
done
# Function to build the Docker image
build_image() {
echo "Building Docker image '$IMAGE_NAME'..."
docker build --no-cache --build-arg CONFIGURATION=Debug -t "$IMAGE_NAME" .
}
# Check if the Docker image already exists or force build
if $FORCE_BUILD || ! docker image inspect "$IMAGE_NAME" &> /dev/null; then
build_image
else
echo "Docker image '$IMAGE_NAME' already exists. Skipping build."
fi
# Run the Docker container
docker run -it --rm -p 5000:5000 -e GameSettings__NumberOfPlayers=1 --name "$IMAGE_NAME" -v "$(pwd)/dockerlogs:/app/logs" "$IMAGE_NAME"
docker-compose.yml
services:
engine:
build: .
container_name: sproutopia_engine
environment:
GameSettings__NumberOfPlayers: 1
volumes:
- "./dockerlogs:/app/logs"
ports:
- "127.0.0.1:5000:5000"
networks:
- sproutopia
networks:
sproutopia:
Also you may have an outdated verstion of Docker. If the above dose not work please send the results of these two commands
docker --version
and
apt-cache policy docker