Virtual Machines, Docker and Containers, oh my.

After returning from our extended weekend of riding dirt bikes in Arkansas I started working in Docker. I have used virtual machines in the past and was fairly familiar with them, and my son had told me about Docker and containers, so last night I started a deep dive into this technology. I downloaded Docker on my Mac and set up my first development container. My plan is to set up on EC2 instance on Amazon Web Services and move one of my WordPress sites to a container and then deploy to my AWS instance. I am hoping this will substantially speed up the performance of the various sites I run and also allow me to have some portability on those sites. Right now I run several web sites on a single virtual machine, but my plan is to run each web site in it’s own container so they are isolated from the other sites, and then be able to deploy those out whevever I like – to their own virtual machine (Amazon EC2 instance) or their own container on a single EC2 instance, depending on cost and performance.

One thing I already don’t like about Docker is that I have to configure and communicate with the Docker dameon using a command line. Geez I hate, hate, hate command line work. I hated it in the old MS-DOS world, I hated it with Cisco, and now I hate it with Docker. I am hoping I can find a visual interface to Docker rather than having to learn and remember their arcane command line interface.

Docker uses containers that “share” an operating system and thus perform faster than virtual machines. My plan is to migrate each of my web sites to a Docker container and then move everything from a Bluehost virtual machine to an Amazon Web Services EC2 Instance – basically Amazon’s version of a virtual machine.

Why is Docker different than a virtual machine?

There are plenty of explanations on the internet about why Docker is different than running a virtual machine so I won’t get into those details. For me the key difference is performance overhead. With Docker, each container “shares” an operating system while with a virtual machine, each VM has it’s own operating system (and the CPU cycle and memory needed to run that operating system). I can still get portability and isolation in my web sites and applications but without the performance overhead of a full-on virtual machine running each site.

PHP

In addition to downloading and learning Docker, I also started learning more about programming in PHP. I never have cared much for software programming. I am familiar with it and with SQL databases, but always tried to avoid doing any more programming than absolutely necessary. I finally decided to dig a little deeper into PHP since WordPress runs on PHP. This will allow me to tweak my web sites on my own without always having to look for plugins to do what I want. Once I get my web sites moved to Amazon Web Services I plan to set up a test environment for each site in a Docker container so I can do testing before deploying into production. My current plan is to use Adobe Dreamweaver for my PHP programming, since I am fairly familiar with Dreamweaver and used it extensively for my very first web sites years ago.

You might be interested in …

Leave a Reply