Docker Community Forums

Share and learn in the Docker community.

Docker exec does not stop

docker

(Pulkit Singhal) #1

I ran a long running job using the exec command to attach to a running container and run in foreground:
docker exec -it e74fb378d1df /apps/run_cmd3.sh

It ran for 10 hours and afterwards it waited for a few minutes before I provided some extra user input via stdin and then it finished in 5 or so minutes. BUT the exec did not exit. At least it didn’t look like it exited. I only received the command prompt again after pressing ctrl+c

Has anyone seen this before? The container status itself still said it was up so this is not the same as previous bugs about exec not terminating when container shuts down.

Specs: DigitalOcean droplet with Docker version 1.11.0, build 4dc5990


(Jeff Anderson) #2

How reproducible is this? Do you have an image/Dockerfile/command to run that others can use to reproduce?

This really mostly sounds like something in your run_cmd3.sh script was still running, and possibly waiting for input. Can you provide the contents of that as well?