Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the common operations of Docker Swarm

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "what are the common operations of Docker Swarm". Friends who are interested may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "what are the common operations of Docker Swarm?"

Docker Swarm is the cluster management tool of Docker. It transforms the Docker host pool into a single virtual Docker host. Docker Swarm provides standard Docker API, and any tool that has communicated with the Docker daemon can be easily extended to multiple hosts using Swarm.

View cluster node docker node ls to create nginx service # docker pull hub.test.com:5000/almi/nginx:0.1# download private repository image docker service create-- name nginx-- replicas 2-- publish 80:80 hub.test.com:5000/almi/nginx:0.1#--network=swarm_test

# replicas 2 create 2 containers, and hub.test.com is a private repository

View one of the container docker kill 96e6bccc2209 of the service docker service lsdocker service ps nginxkill in the swarm cluster

# etc. will automatically start a new container

Modify the number of service instances to 3docker service scale nginx=3 delete nginx service docker service rm nginx delete swarm node docker swarm leave-- force # nodedocker node rm-f # managerdocker swarm common commands docker swarm init # initialize the cluster docker swarm join-token worker # view the tokendocker swarm join-token manager of the work node # view the tokendocker swarm join of the management node # join the cluster docker node common commands docker node ls # View all cluster nodes docker node rm # Delete a node (- f force delete) docker node inspect # # View node details docker node demote # node downgrade Downgrade from management node to work node docker node promote # node upgrade Upgrade from worker node to management node docker node update # update node docker node ps # View Task tasks docker service Common commands docker service create # deploy Services docker service inspect # View Service details docker service logs # see a service log docker service ls # View all service details docker service rm # delete a service (- f force delete) docker service scale # set Set the number of services docker service update # update a service to this I believe that you have a deeper understanding of "what are the common operations of Docker Swarm?" you might as well come to the actual operation. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report