Q. Which of the following Docker commands is used to build an image from a Dockerfile?

  • (A) docker create image
  • (B) docker build -t image_name .
  • (C) docker make image image_name
  • (D) docker image build -t image_name .
πŸ’¬ Discuss
βœ… Correct Answer: (B) docker build -t image_name .
Explanation: 'docker build -t image_name .' is the command to build an image from a Dockerfile in the current directory.
Explanation by: Vikash Gupta
'docker build -t image_name .' is the command to build an image from a Dockerfile in the current directory.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
168
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Vikash Gupta
Publisher
πŸ“ˆ
96%
Success Rate