nerdexam
CompTIACompTIA

XK0-005 · Question #1644

XK0-005 Question #1644: Real Exam Question with Answer & Explanation

The correct answer is A: FROM httpd. {"question_number": 4, "correct_answer": "A", "explanation": "FROM is always the first instruction in a Dockerfile. It specifies the base image from which the new image will be built. Every Dockerfile must begin with a FROM instruction (with the only exception being ARG, which ma

Scripting, Containers, and Automation

Question

A Linux administrator needs to rebuild a container with the httpd service in order to change some default parameters. Which of the following should be the first command line in the Dockerfile?

Options

  • AFROM httpd
  • BBASE httpd
  • CUSE httpd
  • DINHERIT httpd

Explanation

{"question_number": 4, "correct_answer": "A", "explanation": "FROM is always the first instruction in a Dockerfile. It specifies the base image from which the new image will be built. Every Dockerfile must begin with a FROM instruction (with the only exception being ARG, which may precede FROM). FROM httpd pulls the official Apache HTTP Server image as the base. BASE, USE, and INHERIT (options B, C, D) are not valid Dockerfile instructions and will cause a build error.", "generated_by": "claude-sonnet", "llm_judge_score": 4}

Topics

#Docker#Dockerfile syntax#Containerization#Base image

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions