From 8b3ac85cfe72787b73d22e2b95089f7601837e6f Mon Sep 17 00:00:00 2001 From: Astesana Date: Sat, 11 May 2024 18:37:45 +0200 Subject: [PATCH] Make image easier to use in non root mode + Cleanup Easier in non root mode: - Makes config.yml link in image, not at runtime. Cleanup - Removes useless ARG in Docker file. - Removes useless files in image --- docker/Dockerfile | 4 +--- docker/Dockerfile.dockerignore | 2 ++ docker/copy_files.sh | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index df0362e6e..65705ced1 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -12,8 +12,6 @@ COPY . . RUN python3 -m pip install --no-cache-dir -r requirements.txt -ARG CONF_FOLDER=$LICHESS_DIR/config - -RUN chmod +x docker/copy_files.sh +RUN chmod +x docker/copy_files.sh && ln -s $LICHESS_DIR/config/config.yml config.yml CMD docker/copy_files.sh && python3 lichess-bot.py ${OPTIONS} --disable_auto_logging diff --git a/docker/Dockerfile.dockerignore b/docker/Dockerfile.dockerignore index eca9dafc7..332436192 100644 --- a/docker/Dockerfile.dockerignore +++ b/docker/Dockerfile.dockerignore @@ -1,3 +1,5 @@ +docker/* +!docker/copy_files.sh docs/ wiki/ .git* diff --git a/docker/copy_files.sh b/docker/copy_files.sh index 57a55afd5..c7f3bcf3b 100644 --- a/docker/copy_files.sh +++ b/docker/copy_files.sh @@ -1,7 +1,5 @@ #!/bin/sh -ln -s /lichess-bot/config/config.yml /lichess-bot/ - if [ -e /lichess-bot/config/homemade.py ]; then ln -sf /lichess-bot/config/homemade.py /lichess-bot/ fi