使用docker swarm啟動Web服務
docker service create --name webserver -p 8880:80 httpdsudo docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
dk7qnjx65dnx webserver replicated 1/1 httpd:latest *:8880->80/tcp
ebserver scaled to 2
overall progress: 1 out of 2 tasks
1/2: preparing
2/2: running
overall progress: 2 out of 2 tasks
1/2: running
2/2: running
verify: Service converged sudo docker service ps webserver
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
wdpxz2bh9vu7 webserver.1 httpd:latest pi-GB-BSi5A-6200 Running Running 3 minutes ago
olv9p594q03w webserver.2 httpd:latest ubuntu-mate Running Running 58 seconds ago 



Last updated