Docker Base Image

reading time 5 mins

This guide is designed to get you completely set up with Docker using a Doppler base image. We will cover everything from constructing your docker images, high availability, building your images with the Doppler credentials, and debugging locally.

Doppler Base Image

When constructing your Dockerfile, you can use the official Doppler base image. The base images come in a couple of flavors depending on what other dependencies you have. You can also use a different base image.

Image Name

Description

dopplerhq/cli

Alpine base image (alpine)

Versioning

The Doppler CLI follows semantic versioning. All images have tags for their major, minor, and patch versions. We recommend locking to a major version to prevent breaking changes.

Image Name

Version Level

Updates you'll receive

dopplerhq/cli

Latest

  • Breaking changes
  • All new features
  • Bug fixes

dopplerhq/cli:3

Major (recommended)

  • New, backwards-compatible features
  • Bug fixes

dopplerhq/cli:3.1

Minor

  • Bug fixes

dopplerhq/cli:3.1.0

Patch (not recommended)

  • None

Dockerfile

Let's see a full example of a Dockerfile. This Dockerfile will fetch your latest secrets and then run your command with the secrets injected as environment variables.

FROM dopplerhq/cli:3

# Fetch secrets and print them using "printenv" command
ENTRYPOINT ["doppler", "run", "--", "printenv"]

Building the Image

Now let's build the image!

docker build . -t doppler-test

πŸ‘

Amazing Work!

Now you know how to use Doppler's base Docker images!


Did this page help you?