diff --git a/docker/Dockerfile b/docker/Dockerfile index 74a05d5fc..df0362e6e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,6 +1,6 @@ ARG VARIANT FROM python:3$VARIANT -MAINTAINER Jean-Marc Astesana +MAINTAINER Lichess Bot Devs ENV LICHESS_BOT_DOCKER="true" ENV PYTHONDONTWRITEBYTECODE=1 @@ -14,4 +14,6 @@ RUN python3 -m pip install --no-cache-dir -r requirements.txt ARG CONF_FOLDER=$LICHESS_DIR/config +RUN chmod +x docker/copy_files.sh + CMD docker/copy_files.sh && python3 lichess-bot.py ${OPTIONS} --disable_auto_logging diff --git a/docker/copy_files.sh b/docker/copy_files.sh index 3e9b08f83..57a55afd5 100644 --- a/docker/copy_files.sh +++ b/docker/copy_files.sh @@ -1,11 +1,11 @@ #!/bin/sh -ln -s /lichess-bot/config/config.yml config.yml +ln -s /lichess-bot/config/config.yml /lichess-bot/ -if [ -f /lichess-bot/config/homemade.py ]; then - ln -sf /lichess-bot/config/homemade.py homemade.py +if [ -e /lichess-bot/config/homemade.py ]; then + ln -sf /lichess-bot/config/homemade.py /lichess-bot/ fi -if [ -f /lichess-bot/config/extra_game_handlers.py ]; then - ln -sf /lichess-bot/config/extra_game_handlers.py extra_game_handlers.py +if [ -e /lichess-bot/config/extra_game_handlers.py ]; then + ln -sf /lichess-bot/config/extra_game_handlers.py /lichess-bot/ fi diff --git a/wiki/How-to-use-the-Docker-image.md b/wiki/How-to-use-the-Docker-image.md index f4ace986a..6eb60c0f3 100644 --- a/wiki/How-to-use-the-Docker-image.md +++ b/wiki/How-to-use-the-Docker-image.md @@ -22,6 +22,8 @@ You can also find documentation [here](https://github.com/lichess-bot-devs/liche Once your configuration files are ready, let's say in `/home/me/myEngine` folder, run the following command: ```docker run -d -v /home/me/myEngine:/lichess-bot/config --name myBot lichessbotdevs/lichess-bot``` +**NOTE**: Prefer using absolute paths over relative paths, as relative ones may cause problems. + That's all! ### Warning: