Octopus and Docker

I have been looking to integrate docker into our octopus pipeline and am excited to see the work the octopus team has been doing to make this a reality. I read through your docker guides in octopus and have a few questions.

The guides describe how to deploy docker images, but not really how to deploy steps to those containers?

This is what I would ultimately like to do.

  1. Use a windows server image
  2. Create a container
  3. Deploy the project to the container
  4. Start the container
  5. Tear down the container.

Is this possible?

Hi Manny

Thanks for reaching out!

At the moment, this is not really a model we support out of the box.

We currently treat a docker image as a full artifact (ie, a runnable container), rather than creating a container and deploying to it. We expect that the container has been created as part of your CI build, rather than creating a container on the fly.

That said, this is something you could script yourself, but it wouldn’t be that simple. You would have to install a Tentacle inside the container, and then trigger a deployment to it.

We are currently doing some work to publish a docker image with the Tentacle installed, which should be available in the next few weeks.

Once this is available (or you’ve implemented your own), you could setup something similar to:

Project 1:

  • Start container with Tentacle in it
  • Trigger Project 2 using the chain deployment step template

Project 2:

  • Deploy package to Tentacle

In theory, this should work, but I’m not sure I’d treat it as a recommended approach :). Personally, I’d stick to building it on your CI server.

Hope that helps!