Home Picture

Docker

06 Dec 2020 |

Categories: Data-science

Docker

What is Docker?

Docker is a technology which simplifies the complexity of delivering software applications. It can prevents the environment setting problem on every machine and guarantee the reproducibility.

When we develop an application, we usually need to create a project team to complete the product. The project should be covered by different roles, such as Front-end developers (Client), Backend developers (Server), Database Administrators, etc. Normally, the development team will bundle all the necessary software, packages/library dependencies, models, and components into a box called Container, and Docker will operate the application in this container on different platforms for different roles in the team.


How does Docker work?

The project team will define all the requirements (software, environment, dependencies, etc.) in a file called Docker file. A Docker image is created based the Docker file. The application dependencies are bundled into an image. A container is a running instance of the image. Containers are isolated from each other and from the host computer. Team members can run an application in the container on any machine.


Basic workflow

Docker Hub is the official online repository where we can pull the Docker images. In order to get an image from the Docker Hub, Docker needs to be installed in any computer. Then, users can use docker pull command in a command prompt to download an image from the Docker Hub into a computer that is running Docker. By issuing the command, docker run, Docker will run the image in a container. (It is possible to run several containers with the same image at the same time depends on the situation.)

To deeply understand how the Docker works in action, check Basic Docker commands