User Tools

Site Tools


informatica:linux:docker:red

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
informatica:linux:docker:red [2017/02/13 20:07] joseinformatica:linux:docker:red [2017/02/13 20:18] (current) jose
Line 102: Line 102:
 </code> </code>
  
 +====== Crear un servicio ======
 +https://docs.docker.com/engine/swarm/swarm-tutorial/deploy-service/
 +
 +  # docker service create --replicas 1 --name helloworld alpine ping docker.com
 +  ny109vvho4z1f63lo9f2bbsb4
 +
 +  # docker service ls
 +
 +  ID            NAME        MODE        REPLICAS  IMAGE
 +  ny109vvho4z1  helloworld  replicated  1/1       alpine:latest
 +
 +Ahora miramos el servicio
 +
 +https://docs.docker.com/engine/swarm/swarm-tutorial/inspect-service/
 +
 +  docker service inspect --pretty helloworld
 +<code>  
 +ID: ny109vvho4z1f63lo9f2bbsb4
 +Name: helloworld
 +Service Mode: Replicated
 + Replicas: 1
 +Placement:
 +UpdateConfig:
 + Parallelism: 1
 + On failure: pause
 + Max failure ratio: 0
 +ContainerSpec:
 + Image: alpine:latest@sha256:dfbd4a3a8ebca874ebd2474f044a0b33600d4523d03b0df76e5c5986cb02d7e8
 + Args: ping docker.com 
 +Resources:
 +Endpoint Mode: vip
 +</code>
 +
 +Vemos donde corre:
 +  # docker service ps helloworld
 +
 +  ID            NAME          IMAGE          NODE    DESIRED STATE  CURRENT STATE          ERROR  PORTS
 +  l4edt3bnis27  helloworld.1  alpine:latest  swarm3  Running        Running 3 minutes ago         
  
informatica/linux/docker/red.1487016444.txt.gz · Last modified: 2017/02/13 20:07 by jose