Docker Community Forums

Share and learn in the Docker community.

Does "docker restart" cancels all processes inside of a container and start it as a fresh

docker

(Artisanilustrado) #1

I want to cancel all processes inside of a container but I dont want to loose files inside of the container. Considering my container runs a lot of thread processes, i was wondering if “docker restart” will be the perfect solution to my problem.


(Nathan Le Claire) #2

docker restart will restart (I think technically SIGTERM + re-exec) the container’s root process, yes


(Artisanilustrado) #3

Hi nathanleclaire,

thanks for the response in this dumb question, it really does restarts root’s process. Thanks