Docker override config from env variables #8326
Closed
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.
Hello,
It seems a old problem without a clear patch to support it. I've tried to do it as much simple/clean as possible.
With this patch, anyone can override the config with env variable such as:
Take in account that:
IPFSCONFIG_FooBar
thanIPFSCONFIG_FOOBAR
ipfs config
stuff). Something likeIPFSCONFIG_Swarm_EnableAutoRealy=true
will be accepted and written to the config even if it does nothing. So typos could make you loose a lot of hours here :)Hope it helps you. IPFS is really awesome stuff and now it should be more flexible in container environments
/cc #251 #387 #6325
PS: Docker docs should be updated if is finally merged