Skip to content

Latest commit

 

History

History
57 lines (33 loc) · 3.76 KB

File metadata and controls

57 lines (33 loc) · 3.76 KB

Learning Docker

Table of Contents


Introduction

This article will help readers understand what Docker is, why it is used and provide resources on how to start using it. Docker is used by developers for many reasons, however, the most common reasons are for building, deploying and sharing an application quickly. Docker packages your application into something that's called a container. This container is OS-agnostic meaning that developers on Mac, Windows and Linux can share their code without any worry of conflicts. Here's Amazon's Intro to Docker if you want to learn more.


Installation

To start using Docker you will have to download Docker Engine. This is automatically downloaded alongside Docker Desktop (A Graphical User Interface for Docker) which I strongly recommend for beginners. Download Docker Desktop here

For detailed installation instructions based on specific operating systems click here: Mac, Windows, Linux


Getting Started

Once you've installed Docker, to see it in action you can follow any one of these quick tutorials:


Next Steps

Congratulations! you have successfully learnt how to Dockerize an app. In the process, you have learnt what is a Dockerfile, how to create a Dockerfile, how to build a Docker Container Image and how to start a Docker Container. Now what's next?

Now you might want a React Container to communicate with a containerized Flask API. How do we do this? This is where Docker Compose comes in. It allows you to define, and control multiple containers at once. Your next goal should be defining a docker-compose.yml for your project and see if you can get multiple services/containers to successfully communicate.


Other Resources

Here's a cheat sheet of all useful Docker CLI commands and here's a cheat sheet for docker compose which should help you in your future endeavors. All the best!


Docker Terminology

  • Container: A package of code bundled by Docker that runs as an isolated process from your machine. The package of code can be pretty much anything, a single python file, an API, a full stack web application etc. A container is also referred to as a containerized application.

  • Image: template with a set of instructions for creating a container. (most of the times these are pre-built so don't worry too much about making one)

Explained in Docker's own words here