Services and User Management
A container named web01 is serving traffic. An administrator needs a new interactive Bash shell inside it to review configuration files, without interrupting the web server process. Which command accomplishes this?
Show the answer
Correct answerA. docker exec -it web01 /bin/bash
docker exec starts an additional process, here a shell, inside a running container and leaves the main process untouched. docker attach only connects to the main process's streams and gives no new shell, and exiting it can disrupt the service.