美文网首页MySQL on Docker
Docker service deployment across

Docker service deployment across

作者: 凸大愚若智凸 | 来源:发表于2018-05-05 18:09 被阅读0次

    Setup

    Deployment

    • Create Cluster

      # on manager node
      docker swarm init
      
      # on worker node
      # run "docker swarm join-token manager" to get $token and $IP
      # run below command on slave/worker node to join swarm
      docker swarm join --token $token $IP:2377
      
    • Create Network

      docker network create -d overlay <network>
      
    • Create Service

      docker service create --name <svc_name> [--network <network>] --replicas <num> -p <port:target_port> <image>
      
    • Rollout

      docker service update --replicas <num>
      
      docker service update --image <image:tag> <svc_name>
      
      docker service update --update-delay <secs> --update-parallelism <num>
      
    • Inspection

      docker service inspect --pretty <svc_name>s
      
    • Test

      curl docker:<port>
      

    相关文章

      网友评论

        本文标题:Docker service deployment across

        本文链接:https://www.haomeiwen.com/subject/drserftx.html