Q. Which Docker command is used to stop and remove all containers?

  • (A) docker rm -f $(docker ps -a -q)
  • (B) docker stop --all
  • (C) docker container clean
  • (D) docker container remove --all
πŸ’¬ Discuss
βœ… Correct Answer: (A) docker rm -f $(docker ps -a -q)
Explanation: 'docker rm -f $(docker ps -a -q)' stops and removes all containers on the system.
Explanation by: Vijay Sangwan
'docker rm -f $(docker ps -a -q)' stops and removes all containers on the system.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
225
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Vijay Sangwan
Publisher
πŸ“ˆ
90%
Success Rate