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

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -