Project

General

Profile

Actions

Task #475

open

Task #473: Docker learning phase 1

Docker learning phase 1 [Nguyên]

Added by Nguyen Le about 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Start date:
10/24/2023
Due date:
% Done:

100%

Estimated time:

Description

1. What is Docker?
Docker is an open-source platform that allows developers to automate the deployment, scaling, and management of applications. It does this by using containerization, where applications are packaged together with their libraries, dependencies and environment in a standardized unit, called a container. These containers are lightweight, standalone, and executable, enabling applications to run seamlessly in any environment.
2. When to Use/Not Use Docker
Pros of Using Docker
• Portability: Once an application and its dependencies are containerized, they can work seamlessly across different computing environments.
• Version Control: Docker allows you to version your application containers and roll back to previous versions, hence aiding in smooth project management.
• Scalability: Docker has inbuilt capabilities to automate scaling of your applications based on the requirements.
• Speed: Docker containers are lightweight and execute fast, increasing overall system efficiency.
Cons of Using Docker
• Persistent Data Storage: Docker containers are not ideal for applications that require persistent data storage as data stored in containers is ephemeral.
• Complexity: Docker has a steep learning curve and requires time and effort to master.
• Container Management: Managing multiple containers and their communication can be intricate and challenging.
3. What is docker-compose?
Docker-compose is a tool provided by Docker. It allows developers to define and manage multi-container Docker applications. With docker-compose, the application's services are configured using a YAML file, and then, with a single command, you can create and start all the services from your configuration.
4. Common Docker and Docker-Compose Commands
• docker build: This is used to build an image from a Dockerfile.
• docker run: This command is used to run a Docker container from an image.
• docker stop: Stops one or more running containers.
• docker ps: Shows all the running containers.
• docker-compose up: This is used to start up applications.
• docker-compose down: This stops and removes containers, networks, and optionally, volumes and images defined in docker-compose.yml files.
• docker-compose build: This is used to build services defined in a docker-compose.yml file.

No data to display

Actions

Also available in: Atom PDF