Time to make the next step in my career, and growing past just working in legacy .NET Framework apps. I am finally learning how to use Docker and containers effectively. It’s taken awhile to wrap my head around what containers actually are compared to virtual machines. It doesn’t help that there seem to be a lot of different answers to this question and a lot of ways of implementing similar concepts.
Thanks to Pluralsight and a LOT of internet guides, I have slowly learned how to build up containers and bundle them together with docker compose. My plan is to migrate this site and a few other utilities to another server using only docker compose files. That way, future migrations don’t lean on me meticulously configuring servers by hand. Or so the thought goes.
The process has been a little arduous because I tend to just dive into this kind of stuff and will not settle without it being perfect. So far, there have been a lot of lessons learned around HOW to do stuff. Compose files seem to be a bit of the wild west in that there’s a lot of completing philosophies for how to actually write the stuff. You can’t just necessarily take people’s snippets and paste them in without actually understanding your container architecture. This has helped grow my knowledge because its required me to actually understand containers, images, volumes, networks and how they all interconnect.
This opportunity has exposed me to some new flashy tools that I’d take back to the non-Docker world if it applies. Especially trafeik which is api-programmable, network-aware load balancer and reverse proxy that requires a lot less file monkeying than Nginx does. You simply pass in “labels” which function as command switches to configure each of your sites to take into the reverse proxy. This way you don’t have to launch stuff on weird ports and map all of those strange ports together. As long as every container is at least joined to the network shared by the reverse proxy, it can pick it up and register it as a service.
I will continue to write new posts with my findings because its an effective method for me to retain some of this knowledge. I’ve opened a private Github repository with my compose files that I might eventually make public if they’re “good enough”. Carry on!