Docker: Fixes annoying message at restart, makes the image easier to use in non root mode + Cleanup useless files #958
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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. Copying
extra_game_handlers.py
orextra_game_handlers.py
into the container file system still requires guessed permissions.Checklist: