Makes config.yml link during image build, not at runtime.
Removes useless ARG in Docker file.
Removes useless files in the image (everything but copy_files.sh in docker directory)
Type of pull request:
[ ] Bug fix
[ ] Feature
[x] Other
Description:
The main change is to make the config.yml link during the build.
The advantages are:
No more annoying ln: /lichess-bot/config.yml: File exists message in log when a container is restarted.
More importantly: for those, like me, who don't need custom extra_game_handlers.py or extra_game_handlers.py, this allows again (as in version 2024.5.1.2) to run a container based on this image as a non-root user without digging into the source code to guess what permissions are required to prevent the launch from failing with a permission error.
Since the link is created during construction, no permissions are needed to use it at runtime.
PS: Running a container as root on a production environment is a well-known worst practice. Copying extra_game_handlers.py or extra_game_handlers.py into the container file system still requires guessed permissions.
Some enhancements of the Docker image:
config.yml
link during image build, not at runtime.copy_files.sh
in docker directory)Type of pull request:
Description:
The main change is to make the
config.yml
link during the build.The advantages are:
ln: /lichess-bot/config.yml: File exists
message in log when a container is restarted.extra_game_handlers.py
orextra_game_handlers.py
, this allows again (as in version2024.5.1.2
) to run a container based on this image as a non-root user without digging into the source code to guess what permissions are required to prevent the launch from failing with a permission error. Since the link is created during construction, no permissions are needed to use it at runtime. PS: Running a container as root on a production environment is a well-known worst practice. Copyingextra_game_handlers.py
orextra_game_handlers.py
into the container file system still requires guessed permissions.Checklist: