Set ENV var before bundling for gems like sidekiq-pro
weilandia opened this issue · 3 comments
weilandia commented
Is there a way to pass ENV vars to the container before bundling?
ledermann commented
Interesting question. This should work via mounting secrets like the existing .npmrc
/.yarnrc
handling. Will try this later...
ledermann commented
I've just made a change to the Builder
Dockerfile. If your Sidekiq credentials are included in your ~/.bundle/config
file, you can inject this file via secret:
docker buildx build --secret id=bundleconfig,src=$HOME/.bundle/config .
@weilandia Does this help?
weilandia commented
This helps! Thanks @ledermann