
CompTIALinux+
Domain 2Objective 6
Containers XK0-006 Practice Questions (Page 2)
Part of the Services and User Management domain, which accounts for 20% of the XK0-006 exam. CompTIA does not publish an official question count, but from its 90-minute exam (~35–60 total, ~7–12 in this domain), expect 1–2 from this objective — we provide 22 practice questions to prepare you well beyond it. (estimate)
22questions here
5free pages
5concepts
20%of the exam
Questions 6–10
- 6
A system administrator needs to remove a container image from the local Docker host to free up disk space. The image is not being used by any running or stopped container. The administrator wants to remove the image and all its associated layers. Which command should the administrator use?
Select an answer first - 7
A developer has created a Dockerfile and built an image with the tag 'myapp:1.0'. The developer then makes changes to the Dockerfile and rebuilds the image with the same tag. The developer wants to verify that the new image is different from the old one. Which command should the developer use to compare the two images?
Select an answer first - 8
A development team is creating a Dockerfile for a Python web application. The application requires a specific version of Python and several pip packages. The team wants to ensure that the container image is built efficiently and that the application runs as a non-root user for security. Which Dockerfile instruction should be used to set the user that will run the container?
Select an answer first - 9
A system administrator is troubleshooting a Docker container that cannot connect to the internet. The container is running on a custom bridge network. The administrator wants to verify that the container has network connectivity to the outside world. Which command should the administrator use to test connectivity from inside the container?
Select an answer first - 10
A team is creating a Dockerfile for a Node.js application. The application needs to be built with npm install, and the team wants to minimize the final image size by not including the source code and node_modules in the final stage. The team plans to use a multi-stage build. Which Dockerfile instruction is used to copy artifacts from a previous build stage?
Select an answer first
Finished these 5 questions?
Review the revealed explanations, or continue through the curriculum.
Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by CompTIA. “XK0-006” is a trademark of its owner, used for identification only.