> ## Documentation Index
> Fetch the complete documentation index at: https://linux-plus.ipoint-labs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Domain 14 Review Quiz

> 8 practice questions for Domain 14. Managing Containers in Linux.

8 practice questions covering **Managing Containers in Linux**. Read the question, take answers from the room, then reveal.

<div className="quiz" data-total="8">
  <div className="quiz__q" data-n="1" data-answer="A">
    <p className="quiz__stem">
      { "A Linux administrator needs to create and then connect to the app-01-image container. Which of the following commands accomplishes this task?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A" data-correct="1"><span className="quiz__letter">A</span><span className="quiz__text">{ "docker run -it app-01-image" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "docker start -td app-01-image" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "docker build -ic app-01-image" }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "docker exec -dc app-01-image" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: A</p>

      <p className="quiz__why">
        { "The docker run -it command both creates a new container from the specified image and attaches to it interactively, which is exactly what the administrator needs." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="2" data-answer="B">
    <p className="quiz__stem">
      { "A Linux user needs to download the latest Debian image from a Docker repository. Which of the following commands makes this task possible?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "docker image init debian" }</span></li>
      <li className="quiz__choice" data-letter="B" data-correct="1"><span className="quiz__letter">B</span><span className="quiz__text">{ "docker image pull Debian" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "docker image import debian" }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "docker image save debian" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: B</p>

      <p className="quiz__why">
        { "The docker image pull command downloads an image from a Docker repository (such as Docker Hub). Using docker image pull debian retrieves the latest Debian image." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="3" data-answer="B">
    <p className="quiz__stem">
      { "Users cannot access an application that is running inside containers. The administrator wants to validate whether the containers are running. Which of the following commands should the administrator use?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "docker start" }</span></li>
      <li className="quiz__choice" data-letter="B" data-correct="1"><span className="quiz__letter">B</span><span className="quiz__text">{ "docker ps" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "docker run" }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "docker images" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: B</p>

      <p className="quiz__why">
        { "The docker ps command lists all running containers, allowing the administrator to verify whether the application’s containers are active." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="4" data-answer="B">
    <p className="quiz__stem">
      { "A Linux administrator needs to add an instruction into a Dockerfile so that the process /sbin/app-01 is executed when a new container starts. Which of the following accomplishes this task?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "FROM" }</span></li>
      <li className="quiz__choice" data-letter="B" data-correct="1"><span className="quiz__letter">B</span><span className="quiz__text">{ "ENTRYPOINT" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "ONBUILD" }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "EXPOSE" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: B</p>

      <p className="quiz__why">
        { "This instruction defines the executable that is run when a container starts, ensuring the specified process is launched automatically each time a new container is created from the image." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="5" data-answer="B">
    <p className="quiz__stem">
      { "An administrator wants to start an Ubuntu terminal in a container. Which of the following will allow the administrator to complete the task?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "podman pull ubuntu /bin/hash" }</span></li>
      <li className="quiz__choice" data-letter="B" data-correct="1"><span className="quiz__letter">B</span><span className="quiz__text">{ "docker run -it ubuntu" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "containerd /usr/bin/sh ubuntu" }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "rune exec -i ubuntu" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: B</p>

      <p className="quiz__why">
        { "The docker run command creates and starts a container from the Ubuntu image, and the -it options provide an interactive terminal session inside the container." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="6" data-answer="C">
    <p className="quiz__stem">
      { "On a Kubernetes cluster, which of the following resources should be created in order to expose a port so it is publicly accessible on the internet?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "Deployment" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "Network" }</span></li>
      <li className="quiz__choice" data-letter="C" data-correct="1"><span className="quiz__letter">C</span><span className="quiz__text">{ "Service" }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "Pod" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: C</p>

      <p className="quiz__why">
        { "Container orchestration concepts are part of the Automation and Orchestration domain in Linux+ V8. In Kubernetes, workloads run inside Pods, but Pods are not directly accessible from outside the cluster. To expose an application externally, a Service resource must be created. Services provide a stable network endpoint and can be configured as NodePort, LoadBalancer, or ClusterIP. Public exposure is typically achieved using NodePort or LoadBalancer types. Option C, Service, is correct. Deployments manage Pods, but they do not handle networking exposure. Pods represent running containers but lack external accessibility by default. \"Network\" is not a valid Kubernetes resource type. Linux+ V8 documentation highlights Services as the mechanism for exposing containerized applications. Therefore, the correct answer is C." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="7" data-answer="D">
    <p className="quiz__stem">
      { "A systems administrator is building a database container. The container should perform different tasks based on the parameters that are provided during startup (for example, init, start, recover). The administrator wrote a startScript.sh script to achieve this objective. Which of the following Dockerfile statements would run the startScript.sh using the provided parameters?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "RUN /startScript.sh" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "CMD /startScript.sh" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "EXPOSE /startScript.sh" }</span></li>
      <li className="quiz__choice" data-letter="D" data-correct="1"><span className="quiz__letter">D</span><span className="quiz__text">{ "ENTRYPOINT /startScript.sh" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: D</p>

      <p className="quiz__why">
        { "By using ENTRYPOINT, any arguments passed to docker run are appended to /startScript.sh, allowing you to invoke it with different parameters (e.g. docker run your‑image init or docker run your‑image recover)." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="8" data-answer="A">
    <p className="quiz__stem">
      { "A Linux administrator needs to rebuild a container with httpd service in order to change some default parameters. Which of the following should be the first command line in the Dockerfile?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A" data-correct="1"><span className="quiz__letter">A</span><span className="quiz__text">{ "FROM httpd" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "BASE httpd" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "USE httpd" }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "INHERIT httpd" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: A</p>

      <p className="quiz__why">
        { "In a Dockerfile, the FROM instruction defines the base image - in this case, httpd - from which the container will be built. It must be the first command in the Dockerfile." }
      </p>
    </div>
  </div>
</div>
