Menu

StrictlyTyped

Programming and stuff

I deployed Docker into PRODUCTION?!

Yep, it took me over five (yes FIVE) working days and a couple of evenings to get it to a point where deployments are automated, but I got there, and even though I lost so many valuable hours of my life, my love affair with Docker continues.

My introduction to Docker was a strange one really, I’d heard about it everywhere (as has anyone in the tech community) and had used it very very briefly through Docker Compose in a project I’ve tinkered with, but I’d never really looked into it because, well, it scared the living daylights out of me. We’d taken on a project at work that was beautifully suited to Docker – it had to be distributed and deployed into a vast amount (maybe hundreds!) of different environments, so Docker was the way forward.

I started out by purchasing Chris Fidao’s absolutely brilliant Shipping Docker course (which I would very highly recommend to anyone), which took my understanding of Docker to a whole new level. I finally knew the difference between Docker, Docker Compose and Docker Machine and although my brain hurt a little bit, this was definitely the start of a love affair. I’d gotten it working in Development a good few months ago by following the first few modules of the Shipping Docker course and all was well – until it became time to get a staging environment and some continuous integration set up… 😫

So I dealt with this the same way I’d dealt with every hurdle up to this point – I opened up Shipping Docker, found an episode that did something similar to what I wanted to do, copied and pasted the code and then altered and played with it until everything slotted together nicely. This took a lot of trial and error, lots of “I want to go back to git pull && sudo service nginx reload” but I got there in the end, and I’ll tell you what, being able to click Build in Jenkins, have it run all of my unit tests, compile my assets, build a new production-ready Docker image, push it up to AWS ECR (in place of Docker Hub, as we’re already using AWS) and pull it down on a staging server was one of the highlights of my career so far.

It took me a long time, uses a couple of (probably wonky) bash to do some of the dirty work, but I am immensely proud of it and Docker is now a core part of my tooling…

 

…wait, what do you mean by “Kubernetes”?!

 

Leave a Reply