What does stack mean in docker?

WBOY
Release: 2021-12-30 11:24:18
Original
2833 people have browsed it

In docker, stack means "stack service". It is a set of associated service services that can be orchestrated and have scalability. It is used for multi-service deployment and application management. Applications are defined in compose files. , complete deployment and management through the "docker stack deploy" command.

What does stack mean in docker?

The operating environment of this tutorial: linux7.3 system, docker-1.13.1 version, Dell G3 computer.

What does stack mean in docker

Multi-service deployment and management in large-scale scenarios is a difficult thing.

Fortunately, Docker Stack was born to solve this problem. Docker Stack simplifies the management of applications by providing features such as desired status, rolling upgrades, ease of use, expansion and contraction, and health checks. These functions are all Encapsulated in a perfect declarative model.

It’s easy to test and deploy simple applications on your laptop. But this can only be considered an amateur. Deployment and management of multi-service applications in a real production environment is the level of professional players.

Fortunately, Stack was born for just that! Stack enables the definition of complex multi-service applications in a single declaration file. Stack also provides a simple way to deploy an application and manage its complete life cycle: initial deployment -> health check -> expansion -> update -> rollback, and other functions!

The steps are simple. Define the application in the Compose file, and then complete deployment and management through the docker stack deploy command.

The Compose file contains the complete service stack required to form the application. Also included are volumes, networking, security, and other infrastructure required by the application. Then use the docker stack deploy command to deploy the application based on this file.

Stack is based on Docker Swarm to complete application deployment. Therefore, advanced features such as security actually come from Swarm.

In short, Docker is suitable for development and testing. Docker Stack is suitable for large-scale scenarios and production environments.

If you understand Docker Compose, you will find that Docker Stack is very simple. In fact, in many ways, Stack has always been what Compose has been expected to be - fully integrated into Docker and able to manage the entire lifecycle of an application.

Architecturally speaking, Stack is at the top of the Docker application hierarchy. Stack is built on services, which in turn are built on containers, as shown in the figure below.

What does stack mean in docker?

The sample application AtSea Shop will be used throughout the subsequent explanations. The sample is hosted on Github in the dockersamples/atsea-sample-shop-app repository and is open sourced under the Apache 2.0 license.

Use this application because it is moderately complex and not too complex to explain completely. In addition, the application is a multi-service application and utilizes authentication and security-related technologies. The application architecture is shown in the figure below.

What does stack mean in docker?

Recommended learning: "docker video tutorial"

The above is the detailed content of What does stack mean in docker?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template