This past week has been all about containers! I have been doing my best to learn Docker on the fly… I have secretly always wanted to learn more about containers and now capstone is giving me a chance.
To be perfectly honest, Docker has always been this abstract “Cool Thing” that I have heard about, but without an application for it and a reason to learn it…..it didn’t seem to be a priority. But thankfully the project I am working on is perfectly fit for it. We are migrating a legacy simulation engine to the cloud that runs on an older version of .NET Framework, this seemed like a perfect opportunity to use Docker, so here I am. I will use this post to now introduce Docker to you, encase you are wondering about it like I have been.
What is Docker?
Docker is a platform that allows developers to package runtime environments of all different types into a structure known as a container. This has the added benefit of being able to run all sorts of different code in very different environments, but with the added benefit of still being able to integrate it all together. Pretty cool right ? For example, say you had some unique web app that needed to access a Postgres Database, a MySQL database and a MariaDB database, with a Node.js back end and you wanted to quickly generate a front end using Jekyll…. Docker has you covered. You can create a quick docker-compose.yml and run a quick command line command and have the different environments up and running in minutes! There’s a lot more to it than that but in essence it really is that simple. At the root of things docker is built around the idea of a container and some other things.
- Dockerfile – This is essentially a running process of some type. In this file you can configure a number of things including commands to run on start of the container, which ports to expose and more.
- Docker Image – This is the template for running a docker container, there are many official ones such as Ubuntu, Alpine, MySql, Node….. the list goes on. This is kind of the basis for the environment within the container, and you can fully customize them.
- Docker Container – This is essentially a running process that is built from your Dockerfile and image. It is packaged neatly and highly portable.
In designing the architecture of our project we realized early on that containerization will give us a huge benefit in meeting our client requirements. Maybe docker can help you to on a project? I encourage you to look into it!
Thanks for reading, and as always, Happy Coding!
The Mighty Code Beard