Docker has been around for 8 years and it has become a very popular platform for developing software. In the 2020 Stack Overflow Developer Survey, 39.2% of professional developers (total of 44,705) reported that they have done development work using Docker.
Docker is only behind Linux and Windows! For the full list check out Stack Overflow insights.
If you haven't heard of it yet, Docker is software that allows containerisation. Think of it as virtualisation software (i.e. virtual machines) that uses less computational resources. This is extremely useful especially in bioinformatics where installing software can sometimes be an arduous task. Developers can package their software in a container and ship it to an online repository where you can download their image and run it locally on your computer that has Docker Engine up and running. No more dependency hell!
Docker has been extremely useful for me as it allows me to test software (if there isn't already a Docker image for it). On the servers that I have worked on, the Linux operating system (OS) is usually an older more stable release. This means that sometimes I can't use the latest and greatest tools because they depend on more recently released libraries. But with Docker, I can run a container with an updated OS and install the required libraries if need be, and leave the stable server files alone.
I also use Docker to run different services (MySQL and RStudio Server for example) on a server. You can run your own MySQL server with two commands:
# pull image from Docker Hub docker pull mysql:8 # run a container docker run --rm -d -p 3306:3306 --name docker_mysql -v ~/mysql:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=password mysql:8
A word of warning that Docker runs as the root user by default, which has obvious security risks. If this worries you as a sysadmin, see this guide on utilising user namespaces.
This blog post is short because most of my notes on Docker are shared in my learning_docker GitHub repo. The same set of README notes can be viewed using GitHub Pages, if you prefer reading documentation rendered using the Read the Docs theme. In summary, I believe that you should add Docker to your toolkit and it's not that difficult to get started using Docker. As a user, it makes installing and using tools extremely easy and as a developer/software tester, it's a platform that's lightweight, flexible, easy to use, and your users will thank you for making your software easy to install.
This work is licensed under a Creative Commons
Attribution 4.0 International License.