Docker Swarm Commands

This tutorial requires connectedness to the network equally swarm creation together with management needs Docker Hub.

Requirements


  • Windows
  • Docker CE
  • VirtualBox
*Needless to say, a docker for windows must hold out running.

 docker run swarm practice --Download the swarm picture locally. Returns a unique id that is required to practice a cluster. Example: TOKEN_ID.  docker-machine practice -d hyperv --swarm --swarm-master --swarm-discovery token://TOKEN_ID swarm-master --Create the swarm. controller.  docker-machine practice -d hyperv --swarm --swarm-discovery token://TOKEN_ID swarm-node-01 docker-machine practice -d hyperv --swarm --swarm-discovery token://TOKEN_ID swarm-node-02 --Add swarm nodes  Use --virtualbox-no-vtx-check, if you're going to purpose virtualbox  --List all the running machines docker-machine ls docker run swarm listing token://TOKEN_ID  --Remove from the swarm docker node rm swarm-node-01  --Demote a swarm principal together with then it tin hold out deleted docker node demote swarm-master  --Remove the node docker automobile docker-machine rm swarm-node-01  --connect to the principal node docker-machine ssh swarm-master  --must hold out executed on principal node --creates a swarm docker swarm init --advertise-addr <SWARM-MASTER-IP>  --login to swarm-node-01 together with swarm-node-02 together with perform the bring together command below --join a automobile equally a node to the swarm docker swarm bring together --token TOKEN_ID <swarm-master-ip>:2377  --what if nosotros forgot the token for joining the swarm? docker swarm join-token worker  --displays the data near the swarm docker node ls 

Reference

  • https://docs.docker.com/engine/swarm/stack-deploy/#push-the-generated-image-to-the-registry
Next
Previous
Click here for Comments

0 komentar:

Please comment if there are any that need to be asked.