docs/integrations/platforms/docker-intro.mdx
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.
<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> <Card title="Docker Entrypoint" color="#ea5a0c" href="./docker"> Install and run your app start command with Infisical CLI </Card> <CardGroup cols={2}> <Card title="Docker run" color="#0285c7" href="./docker-pass-envs"> Feed secrets with the `--env-file` flag when using the `docker run` command </Card> <Card title="Docker compose" color="#16a34a" href="./docker-compose"> Inject secrets into multiple services using Docker Compose </Card> </CardGroup> <Info> The main difference between the "Docker Entrypoint" and "Docker run" approach is where the Infisical CLI is installed. In most production settings, it's typically less convenient to have the Infisical CLI installed and executed externally, so we suggest using the "Docker Entrypoint" method for production purposes. However, if this limitation doesn't apply to you, select the method that best fits your needs. </Info>