312-97 practice question 27 of 35
(Brady Coleman is a senior DevSecOps engineer at CloudVac Security Private Ltd. He has created a new container named “eccbrad” from the centos:7 image using the command docker run -i -t --name geeklab centos:7 /bin/bash. Now, Brady wants to install the httpd package inside the eccbrad container. Which of the following commands should Brady use to install the httpd package inside the container?)
Full set: 100 questionsThe scenario involves a Docker container created from the centos:7 image. CentOS 7 uses the Yellowdog Updater, Modified (YUM) as its default package manager. To install a software package like the Apache HTTP Server (httpd) inside this container, the correct command is yum install httpd. Since Docker containers often run the initial process as the root user by default, sudo is typically not required. The command yum install instructs the YUM package manager to download and install the specified package and its dependencies.
A. install-httpd is not a standard command, and sudo is likely unnecessary as the default user in a container is root.
B. install is not the correct command for the YUM package manager; yum is the command-line utility to be used.
C. The syntax yum install-httpd is incorrect. A space is required between the install action and the package name httpd.
- Red Hat. (2023). Chapter 9. Installing, removing, and upgrading packages. RHEL 7 System Administrator's Guide. Retrieved from https://access.redhat.com/documentation/en-us/redhatenterpriselinux/7/html/systemadministratorsguide/ch-yum. Section 9.2, "Installing Packages," specifies the command syntax as yum install packagename.
- Docker Inc. (n.d.). docker run reference. Docker Docs. Retrieved from https://docs.docker.com/engine/reference/run/. The documentation explains how containers are created from images. The behavior inside the container is determined by the base image's operating system, which is CentOS 7.
Keep practicing
Take the free 312-97 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 312-97 practice questions
- Question 1(Sandra Oliver joined SinClare Soft Pvt. Ltd. as a DevSecOps engineer in January of 2010.…
- Question 2(Robert Wheeler has been working as a DevSecOps engineer in an IT company for the past 5 …
- Question 3(Debra Aniston is a DevSecOps engineer in an IT company that develops software products a…
- Question 4(Craig Kelly has been working as a software development team leader in an IT company over…
- Question 5(Walter O’Brien recently joined as a junior DevSecOps engineer in an IT company located i…
- Question 6(SinCaire is a software development company that develops web applications for various cl…
