Which command shows logs from a container named api?
Show answerHide answer
docker logs reads stdout/stderr captured from a container. docker inspect shows metadata, not the log stream.
12 practical Docker Fundamentals questions with an explanation after every answer. No timer, no signup — about 8 minutes.
This Docker Fundamentals quiz is a Practical fundamentals check. It covers images, containers, Dockerfiles, COPY, RUN, CMD, ports, volumes, Compose, build context, logs, exec, and registries. The quiz has 12 questions, takes about 8 minutes, and a score around 8 out of 12 means you have a workable baseline.
The 12 questions on this page are built for practical container workflow screening. They focus on practical decisions you would make while building, debugging, querying, or operating real projects.
Three examples from the 12-question quiz. Answers stay hidden until you reveal them.
Which command shows logs from a container named api?
docker logs reads stdout/stderr captured from a container. docker inspect shows metadata, not the log stream.
Which command opens a shell inside a running container named web when bash is available?
docker exec runs a command inside an existing running container. -it allocates an interactive terminal.
What is Docker Hub an example of?
Docker Hub is a registry for pushing and pulling container images. Private registries such as ECR, GHCR, and GCR serve the same broad role.
Compare your fundamentals across Git, AWS, Linux, SQL, Python, and Docker.
See all free quizzes