How do I stop a docker container so it will rerun with the same command? -
i start docker container name. this:
docker run --name regsvc my-registrationservice if call docker stop regsvc, next time run above command fails. have run these commands first.
docker kill regsvc docker system prune that seems excessive. there better way stop container , restart it?
thnx matt
i believe want run new container every time issue docker run , better use --rm flag:
docker run --rm --name regsvc my-registrationservice this remove container when container exits. better if don't want save data of container.
as suggested @trong-lam-phan restart existing container using
docker restart regsvc
Comments
Post a Comment