I cant configure bundler using docker

It is quite common to make some bundle settings via environment variable and in my specific case I want to access a private gem via github where I need access by a secret key

In my local environment and also in heroku I just need to set the BUNDLE_GITHUB__COM environment variable and that works fine

At the end of this bundler doc have an explanation about this variable use Bundler: bundle config
Heroku also has documentation on this Bundler Configuration | Heroku Dev Center

In the case of docker, the ghcr.io/renderinc/heroku-app-builder:heroku-20 image is already ready and I don’t have the possibility to set this variable before it executes the bundle install

Do you have any solution for this?

Hi there,

Thanks for reaching out.

Docker builds on Render don’t have access to the environment variables, you may need to refer to this documentation to set config at build time: Using Secrets with Docker.

Alternatively, if your project doesn’t require any special libraries installed with Docker, it maybe worth trying a Ruby Native Environment to get up and running.

Kind regards

Alan