Q. What does the 'docker exec -it container_name /bin/sh' command do?

  • (A) Starts a new container in interactive mode
  • (B) Executes a bash shell inside a running container
  • (C) Starts a new shell in the Docker host system
  • (D) Executes the shell command in the background
πŸ’¬ Discuss
βœ… Correct Answer: (B) Executes a bash shell inside a running container
Explanation: 'docker exec -it container_name /bin/sh' opens an interactive shell inside the specified container.
Explanation by: Gopal Sharma
'docker exec -it container_name /bin/sh' opens an interactive shell inside the specified container.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
155
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Gopal Sharma
Publisher
πŸ“ˆ
85%
Success Rate