docker service create image command like `docker run` -


does use docker service create command docker run -it ubuntu bash ?

e.g: docker service create --name test redis bash.

i want run temp container debugging on production environment in swarm mode same network.

this result:

user@ubuntu ~/$ docker service ps test id                         name        image  node    desired state  current state            error bmig9qd9tihw7q1kff2bn42ab  test.1      redis  ubuntu  ready          ready 3 seconds ago 9t4za9r4gb03az3af13akpklv   \_ test.1  redis  ubuntu  shutdown       complete 4 seconds ago 1php2be7ilp7psulwp31b3ib4   \_ test.1  redis  ubuntu  shutdown       complete 10 seconds ago drwyjdggd13n1emb66oqchmuv   \_ test.1  redis  ubuntu  shutdown       complete 15 seconds ago b1zb5ja058ni0b4c0etcnsltk   \_ test.1  redis  ubuntu  shutdown       complete 21 seconds ago 

when create service startup bash imediately stop because in detached mode. can have same behavior if run docker run -d ubuntu bash


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - IE9 error '$'is not defined -