Professor, estou com o erro de quando eu subo o serviço ele logo se encerra e vai criando outro, veja abaixo
root@vm1:~# docker service create --name my_sql2 -p 9999:3306 -e MYSQL_ROOT_PASSWORD=root123 -e MYSQL_USER=root -e MYSQL_PASSWORD=root123 mysql:5.7
yxhfoah7pnw5fxpdgspgejn1u
overall progress: 1 out of 1 tasks
1/1: running [==================================================>]
verify: Service converged
root@vm1:~#
root@vm1:~#
root@vm1:~# docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
kvlblg1f5ow0 modest_matsumoto replicated 1/1 aluracursos/barbearia:latest *:8000->3000/tcp
yxhfoah7pnw5 my_sql2 replicated 0/1 mysql:5.7 *:9999->3306/tcp
root@vm1:~# docker service ps yxh
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
nl07gmjesc7b my_sql2.1 mysql:5.7 vm1 Running Running 6 seconds ago
ao8jqfqu04az \_ my_sql2.1 mysql:5.7 vm1 Shutdown Failed 11 seconds ago "task: non-zero exit (1)"