This repository has been archived by the owner on Sep 7, 2023. It is now read-only.
Add capability to disable user and permission management with env var #129
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.
This allows the container to be run in a mode where we don't drop to the consul user and do not perform chown on the data/conf directories and do not ever try to enable privileged port binding.
Essentially using the env var opts you out of all the permission type things and you now need to manage it yourself.
It can now be run like:
docker run -e CONSUL_DISABLE_PERM_MGMT= consul:latest
Without specifying the new environment variable the previous behavior will be used.
The main use case for this is around executing the container as non-root. The user running the container will then need to ensure that the permissions on the data directory and the config directory allow the user running the container access.