Docker
The Infisical CLI can be added to Dockerfiles to fetch secrets from Infisical and make them available as environment variables within containers at runtime.
Prerequisites:
- Have a project with secrets ready in Infisical Cloud.
- Create an Infisical Token scoped to an environment in your project in Infisical.
Dockerfile Modification
Follow the instructions for your specific Linux distribution to add the Infisical CLI to your Dockerfile.
Next, modify the start command of your Dockerfile:
Launch
Spin up your container with the docker run
command and feed in your Infisical Token.
Your containerized application should now be up and running with secrets from Infisical exposed as environment variables within your application’s process.
Example Dockerfile
See also:
Was this page helpful?