Commandes Linux : docker stack deploy

DOCKER STACK DEPLOY

Commande : docker stack deploy

Usage:	docker stack deploy [OPTIONS] STACK

Deploy a new stack or update an existing stack

Aliases:
  deploy, up

Options:
      --bundle-file string     Path to a Distributed Application Bundle file
  -c, --compose-file strings   Path to a Compose file, or "-" to read from stdin
      --orchestrator string    Orchestrator to use (swarm|kubernetes|all)
      --prune                  Prune services that are no longer referenced
      --resolve-image string   Query the registry to resolve image digest and supported platforms ("always"|"changed"|"never") (default "always")
      --with-registry-auth     Send registry authentication details to Swarm agents

 

Déployer une nouvelle stack ou mettre à jour une stack existante à partir d’un fichier Docker Compose

$ docker stack deploy [OPTIONS] -c /path/to/file.yml stack

ex :

$ docker stack deploy -c docker-stack.yml mystack
Creating network mystack_frontend
Creating network mystack_backend
Creating network mystack_default
Creating service mystack_visualizer
Creating service mystack_redis
Creating service mystack_db
Creating service mystack_vote
Creating service mystack_result
Creating service mystack_worker
$ docker stack ls
NAME                SERVICES            ORCHESTRATOR
mystack             6                   Swarm
$ docker service ls
ID                  NAME                 MODE                REPLICAS            IMAGE                                          PORTS
kn1qdmquzz1r        mystack_db           replicated          1/1                 postgres:9.4
xt2mwakr6u66        mystack_redis        replicated          1/1                 redis:alpine                                   *:30001->6379/tcp
3qi1rdmocngh        mystack_result       replicated          1/1                 dockersamples/examplevotingapp_result:before   *:5001->80/tcp
xehxo13zisbz        mystack_visualizer   replicated          1/1                 dockersamples/visualizer:stable                *:8080->8080/tcp
ryq7lsbz944j        mystack_vote         replicated          2/2                 dockersamples/examplevotingapp_vote:before     *:5000->80/tcp
q2onk7lai1xc        mystack_worker       replicated          1/1                 dockersamples/examplevotingapp_worker:latest

 

Fermer le menu
%d blogueurs aiment cette page :