Free CompTIA Linux+ XK0-005 Practice Question

A systems administrator needs to investigate an issue in a Docker container that is failing to start correctly. The administrator wishes to view the output logs to diagnose the problem. Which command should the administrator run to display the last 50 lines of logs from the container named 'web-app'?

  • docker container logs web-app --last 50

  • docker logs --tail 50 web-app

  • docker logs -f web-app | tail -50

  • docker inspect --format='{{.LogPath}}' web-app

This question's topic:
CompTIA Linux+ XK0-005 / 
Scripting, Containers, and Automation
Your Score:

Check or uncheck an objective to set which questions you will receive.

SAVE $45