Integrating with Docker
Inject variables into your container
Here is an example Dockerfile
The base image in this example, already has node installed. This is required as
secretsfoundry
is an npm package. In case, your base image is different, make sure to havenode
andnpm
installed in the image before proceeding to installsecretsfoundry
Once we get the image ready, we are ready to install
secretsfoundry
on our container. To installsecretsfoundry
, runnpm install -g secretsfoundry
Once that's done, we are ready to use
secretsfoundry
. In the example above, we are calling a sample.js
file which is loaded onto the container.
Once built and run, the container will run node example.js
with the injected .env
file values
Last updated