Octopus Deploy Documentation

Execution containers for workers

Last updated

For a step running on a worker or on the Octopus Server, you can select a Docker image to execute the step inside of.

Execution containers for workers are not currently supported for Octopus Cloud Dynamic Worker pools.
The dynamic workers do not have Docker installed. This will be addressed in the near future.

When an execution container is configured for a step, Octopus will still connect to the worker machine via a Tentacle or SSH. The difference is that the specified image will be run as a container and the step will be executed inside the container (using the docker exec command).

See the blog post announcing this feature for some added context.

Minimum requirements

You need Docker installed and running on the worker/Octopus Server (built-in worker), in order to use execution containers for workers

How to use execution containers for workers

  • Configure a feed in Octopus Deploy for a Docker registry.
  • Add a project and define a deployment process (or add a runbook).
  • Set the Execution Location for your step to Run on a worker.
  • In Container Image select Runs on a worker inside a container.
  • Choose the previously added container registry.
  • Enter the name of the image (aka execution container) you want your step to run in. (e.g. octopusdeploy/worker-tools:1.0.5-ubuntu.18.04).
  • Click Save.
  • Click Create release & deploy.

First deployment on a docker container

Pre-pulling your chosen image will save you time during deployments.

When you choose to run one or more of your deployment steps in a container, your deployment process will docker pull the image you provide at the start of each deployment during package acquisition.

For your first deployment this may take a while since your docker image won't be cached. You can pre-pull the desired docker image on your worker before your first deployment to avoid any delays.

What docker image should I use?

  • You can use any image that meets the minimum tooling requirements to run your chosen step.
  • You can use our recommended images (see below).
  • You can build your own based on the recommended images.

The octopusdeploy/worker-tools docker images

We provide recommended images on DockerHub octopusdeploy/worker-tools that include common tools used for octopus steps.

We recommend using our worker-tools image as a starting point for your own custom image to run on a worker

The canonical source for what is contained in the octopusdeploy/worker-tools images is the Dockerfile's in the GitHub repo. For example:

Some of the tools included are:

  • Octopus Deploy CLI and .NET client library
  • .NET Core
  • Java (JDK)
  • NodeJS
  • Azure CLI
  • Google Cloud CLI
  • kubectl
  • Helm
  • Terraform
  • Python

Need support? We're here to help.