A Beginners Guide to Docker
Introduction
Docker may just be a word you have heard during technical demos, or it might be something you know a little about but only in a vague way. If this is the case then this is the blog for you!
Over the next 500 or so words I will outline what Docker is and why you would use it and provide a handy glossary of terms and some useful resources. Hopefully this will become a useful quick reference guide for all things Docker!
What is it?
‘’Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications. By taking advantage of Docker's methodologies for shipping, testing, and deploying code, you can significantly reduce the delay between writing code and running it in production.’’- Docker Documentation
Maybe that is still too many words...
Put more simply, Docker is an open-source tool that acts like a little box which you put all the parts of your project in - certain versions of packages, files of multiple languages etc. This means that when you come to share your project with your team they have everything they need all in one place - handy!
Docker has become extremely popular with developers and was even voted the number 1 most used tool by developers in Stack Overflows' 2024 Developer Survey - it is definitely something to have in your toolkit.
Why use it?
Consistency across environments: A common problem in development arises when you want to share your work with someone else. Conversations like ‘I get an error’, ‘well it works on my machine’ can be common (and frustrating). Docker helps solve this problem as all parts of the project are contained within the Docker container, allowing for consistent use across computers and environments.
Efficient resource utilisation: Dockers lightweight containers use fewer system resources compared to full virtual machines (I will not go into detail about virtual machines in this blog, but I have left a reading link in the ‘Useful links & resources’ section which explains this).
Speed and agility: Docker speeds up development, testing, and deployment processes because of the ease of sharing work. This is why Docker is an extremely useful tool in DevOps.
Docker glossary
- Docker image: a file that contains everything needed to run your project, this might include the code, libraries, dependencies, and system tools. When you run a Docker image it creates a container, which is an isolated environment that runs your application. This helps ensure that the app behaves the same way, no matter where it runs (avoid those annoying back and forth conversations!).
- Docker container: a stand alone environment that runs whatever is in your Docker image. Containers separate the application in your Docker image, and its dependencies, from your host system, ensuring consistent behaviour across different environments.
- Docker hub: an online platform where you can find and share Docker images. It's like a library for Docker images, so can find some of the main ones like the Python image or some smaller open source projects.
Conclusion
In conclusion, Docker is an extremely useful tool for developers and is growing in popularity in the DevOps space. I recommend going through some of the Docker official training and giving it a go!
Useful links & resources
Official Docker links
Getting started with Docker: https://www.docker.com/get-started/
Docker Hub (the online platform for images): https://www.docker.com/products/docker-hub/
Docker Training (official training from Docker): https://www.docker.com/resources/trainings/
Docker Documentation (for those who prefer reading over videos!): https://docs.docker.com/
Stack Overflow
See all questions with the tag ‘docker’ on Stack Overflow: https://stackoverflow.com/questions/tagged/docker
Virtual machine information
A easy to understand guide on virtual machines from Microsoft: https://azure.microsoft.com/en-gb/resources/cloud-computing-dictionary/what-is-a-virtual-machine
References
https://docs.docker.com/guides/docker-overview/
https://survey.stackoverflow.co/2024/technology/#most-popular-technologies
Comments
Post a Comment