XK0-005 · Question #498
XK0-005 Question #498: Real Exam Question with Answer & Explanation
The correct answer is B: podman exec -ti app /bin/sh. Podman exec -ti app /bin/sh allows the Linux administrator to enter the running container and analyze the logs that are stored inside. This command uses the podman tool, which is a daemonless container engine that can run and manage containers on Linux systems. The exec option ex
Question
A Linux administrator needs to analyze a failing application that is running inside a container. Which of the following commands allows the Linux administrator to enter the running container and analyze the logs that are stored inside?
Options
- Adocker run -ti app /bin/sh
- Bpodman exec -ti app /bin/sh
- Cpodman run -d app /bin/bash
- Ddocker exec -d app /bin/bash
Explanation
Podman exec -ti app /bin/sh allows the Linux administrator to enter the running container and analyze the logs that are stored inside. This command uses the podman tool, which is a daemonless container engine that can run and manage containers on Linux systems. The exec option executes a command inside an existing container, in this case app, which is the name of the container that runs the failing application. The -ti option allocates a pseudo-TTY and keeps STDIN open, allowing for interactive shell access to the container. The /bin/sh argument specifies the shell command to run inside the container, which can be used to view and manipulate the log
Topics
Community Discussion
No community discussion yet for this question.