makeporngreatagain.pro
yeahporn.top
hd xxx

Introduction to Docker Services

277
  1. Create a simple service running the nginx image.
    docker service create nginx
  2. Create an nginx service with a specified name, multiple replicas, and a published port.
    docker service create --name nginx --replicas 3 -p 8080:80 nginx
  3. Use a template to pass the node hostname to each container as an environment variable.
    docker service create --name node-hostname --replicas 3 --env NODE_HOSTNAME="{{.Node.Hostname}}" nginx
  4. Get the container running on the current machine, and print its environment variables to verify that the NODE_HOSTNAME variable is set properly.
    docker ps
    docker exec <CONTAINER_ID> printenv
  5. List the services in the cluster.
    docker service ls
  6. List the tasks for a service.
    docker service ps nginx
  7. Inspect a service.
    docker service inspect nginx
    docker service inspect --pretty nginx
  8. Change a service.
    docker service update --replicas 2 nginx
  9. Delete a service.
    docker service rm nginx
  10. Create a global service.
    docker service create --name nginx --mode global nginx
  11. Two different ways to scale a service:
    docker service update --replicas 3 nginx
    docker service scale nginx=4

Comments are closed, but trackbacks and pingbacks are open.

baseofporn.com https://www.opoptube.com
Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.