I’ve been spending this week getting more familiar with Docker. I’ve learned how to build new images, spin up a collection of related containers with Docker Compose, and push an image to AWS.
I’m pretty excited about how this will help my team, but I’m also nervous about the unknowns we’ll encounter. My goal is to free up time, not take up more.
It’s important to know what Docker is and isn’t. To be honest, I’m still a little fuzzy. I wrote about this in my last post.
Docker utilizes virtualization technology to run processes in isolated environments called Containers. It has some similarities to virtual machine technology, such as VMWare and VirtualBox.
Docker Containers do not hold an OS, but they do have libraries and binaries from other OSes.
After working with Docker a little, I’m now much familiar with commands to setup a container and access the container (docker exec -it is my friend). I’ve also gotten more familiar with docker-compose (docker-compose up/down are pretty cool).
The documentation for Drupal on Docker provides info on both setting up Drupal and MySQl.
I’ve been able to spin up a Redis and MySQL server with Docker, it has simplified the setup and given my team a consistent toolset.
Fargate
I’m currently working through Fargate, which is part of the ECS service on AWS. Setup is a little overwhelming, because you don’t just define a docker-compose and run your container (at least I haven’t come across a way with docker-compose). Instead, you add a task definition, and then have options on how the task runs.
Tasks can be something that starts, processes some data, and then shuts down. Or they can be a continually run task like a web server.
ECR
Another AWS service, Elastic Container Registry (ECR), can hold Docker images I create.
One cool thing I discovered about this service is that it will scan the Dockerfile/image contents for vulnerabilities. This was something I was worried about going into Docker.
The Python 2.7 image I was using had several critical vulnerabilities, so I will need to find a more secure image.
Conclusion
This has been a productive week with Docker. I feel like I’ve got a better understanding of the underlying technology.
Docker will help my team by simplifying setup of tools and make our environments more consistent.