14

I have been using Octopus Deploy for sometime now just to deploy a web application onto an AWS EC2 instance. I am aware that Octopus Deploy is .NET specific and the learning curve is quite easy when compared to Docker. I understand one of the point of using Docker is to create containers rather than running using hypervisers to create VMs.

But my question is what are the real reasons to use Docker over octopus deploy ? which is better for deploying applications. Do they do different things ?

floormind
  • 1,868
  • 5
  • 31
  • 85

1 Answers1

23

Good question. They do different things and work in different ways, but there is some overlap in the problems they address. Octopus is about shipping a built application - Docker is about building an application into a self-contained package, which you can ship and run as a container.

Disclaimer: I'm a Docker Captain (Docker's community recognition program) and I've been investing a lot of time in Docker. I'm biased towards it because I think it's fantastic tech - Octopus us great too, but the scope is smaller. If you want a broader overview of Docker, I talked about it recently on Channel 9.

With Octopus you can take a compiled ASP.NET web app and deploy it to your servers. Using the Octopus Library you can use templates to set up your app platform as part of the deployment, configuring IIS, running Windows Services etc. But your servers need the pre-requisites already set up (.NET, IIS etc.), they need the Octopus agent installed to be able to run the deployments, and you need the Octopus server to co-ordinate it.

With Docker you can take a compiled ASP.NET web app and build it into an image - which is a single logical unit that contains your whole application stack. The image has IIS and ASP.NET, your app, your app's dependencies and all its configuration in a single unit. You can push and pull the image to a Docker registry (a shared image store), and run your app on any Windows machine with Docker installed. Your host doesn't need IIS or ASP.NET installed - it's all inside the image, and you don't need additional infrastructure, Docker just runs as a Windows Service on the host.

Docker runs your apps, as well as building and shipping them. Applications run in containers which are lightweight, isolated sandboxes on the host. You can have containers running apps with different versions of .NET, different versions of IIS, even different versions of Windows - all running on the same host without affecting each other.

You can split an application into many containers, they can all access each other in a virtual network, and you can capture complex distributed solutions using Docker Compose to define the parts and their relationship. You can cluster multiple hosts together into a Docker Swarm which gives you easy scaling, failover and rolling upgrades. And you can use the commercial Docker Datacenter product to manage all your images, hosts and containers, and secure access to it all.

Elton Stoneman
  • 17,906
  • 5
  • 47
  • 44
  • Wow thank you for the very well explained answer!.. I think i am now a docker enthusiast from reading that. So basically to reiterate, I will not need to manually install all my project dependencies on a server, such as IIS, ASP.Net etc, instead i will put these dependencies on an image, that image can then be pushed to a registery and I can use this image on any server... I guess the advantage to that is that I wont have do an entire installation of dependencies again on a new server is i want to push my app onto the new one. – floormind Oct 05 '16 at 10:36
  • Yep. With Docker your infrastructure requirements are (machine + network + Docker). You can use the Docker Hub for your images, which is a public registry, or run your own registry locally. – Elton Stoneman Oct 05 '16 at 10:47
  • Ok so my question is, what about for issues like CI, so running my builds and unit tests in Teamcity after commits, does this mean, i will have to do this seperately from the then build the app again into the docker container and deploy the container ? the usual process for me is write code, commit, build in teamcity, run test in teamcity, create package with octopack, deploy package with octopus deploy... But if you're saying Docker ships a compiled version, that means ill have to have done all these steps before putting the app in the container for shipping ? – floormind Oct 05 '16 at 16:23
  • Correct, you still do everything pre-packaging in TeamCity as you did before. – 9swampy Nov 21 '16 at 14:28
  • Thanks for this (old) explanation. Attended DockerCon in Copenhagen this week, and saw your talk(s?) and spent a lot of time at the "Using Docker" track. We also heavily use Octopus and have streamlined our deployments into here. But I never got to talk to you about if Docker could entirely replace something like Octopus.. Long term, it sounds that it's the most valuable approach. – Hulvej Oct 19 '17 at 12:07
  • If Docker can bundle different versions of the OS, is licensing a problem? – Burndog Jul 20 '21 at 15:52