Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

docs: surface Docker CLI usage in quickstart, embed Docker video on hub page

Jake Hulberg43745dac3491
diff --git a/docs/cli/usage.mdx b/docs/cli/usage.mdx
index e0447da668..42535d9cb4 100644
--- a/docs/cli/usage.mdx
+++ b/docs/cli/usage.mdx
@@ -85,6 +85,39 @@ The CLI is designed for a variety of secret management applications ranging from
</Tab>
+ <Tab title="Docker containers">
+ Install the Infisical CLI into your Docker image and start your application with it to inject secrets at runtime.
+
+ <Steps>
+ <Step title="Install the Infisical CLI in your Dockerfile">
+ Install the CLI with the package manager of your base image. The example below targets Alpine; find the commands for other distributions [here](/cli/overview).
+
+ ```dockerfile
+ RUN apk add --no-cache bash wget && \
+ wget -qO- 'https://artifacts-cli.infisical.com/setup.apk.sh' | sh && \
+ apk update && apk add infisical
+ ```
+ </Step>
+ <Step title="Start your application with the CLI">
+ Set your container start command to run your application through `infisical run`. The CLI fetches your secrets from Infisical and injects them as environment variables.
+
+ ```dockerfile
+ CMD ["infisical", "run", "--projectId", "<your-project-id>", "--env", "prod", "--", "npm", "run", "start"]
+ ```
+ </Step>
+ <Step title="Authenticate the container">
+ Create a [machine identity](/documentation/platform/identities/machine-identities) and pass its access token to the container through the `INFISICAL_TOKEN` environment variable.
+
+ ```bash
+ docker run --env INFISICAL_TOKEN=$INFISICAL_TOKEN <your-image>
+ ```
+ </Step>
+ </Steps>
+
+ For Docker Compose and `--env-file` workflows, see the [Docker guides](/integrations/platforms/docker-intro).
+
+ </Tab>
+
<Tab title="Staging, production & all other use cases">
In the following steps, we explore how to use the Infisical CLI in a non-local development scenario
to fetch back environment variables and export them to a file.
diff --git a/docs/integrations/platforms/docker-intro.mdx b/docs/integrations/platforms/docker-intro.mdx
index bec0f42138..e4cdb3a086 100644
--- a/docs/integrations/platforms/docker-intro.mdx
+++ b/docs/integrations/platforms/docker-intro.mdx
@@ -5,6 +5,22 @@ description: "Learn how to feed secrets from Infisical into your Docker applicat
There are many methods to inject Infisical secrets into Docker-based applications.
Regardless of the method you choose, they all inject secrets from Infisical as environment variables into your Docker container.
+Watch the video below for an overview of managing environment variables in Docker, covering Docker Compose, Docker secrets, and injection with the Infisical CLI.
+
+<br />
+
+<div style={{ position: "relative", paddingBottom: "56.25%", height: 0, overflow: "hidden", maxWidth: "100%" }}>
+ <iframe
+ src="https://www.youtube.com/embed/oU2nNBwlOTA"
+ title="YouTube video player"
+ style={{ position: "absolute", top: 0, left: 0, width: "100%", height: "100%", border: 0 }}
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
+ allowfullscreen
+ ></iframe>
+</div>
+
+<br />
+
<Card title="Docker Entrypoint" color="#ea5a0c" href="./docker">
Install and run your app start command with Infisical CLI
</Card>