Containers · Docker CLI interview questions

18 Containers · Docker CLI questions from the MLOps & Integration bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.

Free to start: the 2-minute IT readiness check — six questions and a result.

Take the free IT readiness check

or take a mock interview set up for this area

1. What does docker build -t app:1.0 . do?

Junior
  1. A.list the currently running containers
  2. B.build an image from the Dockerfile in the current directory and tag it app:1.0
  3. C.start a container in the background mapping host port 8080 to container port 80
  4. D.upload the tagged image to its remote registry

Answer + AI explanation with Pro

2. Which command will build an image from the Dockerfile in the current directory and tag it app:1.0?

Junior
  1. A.docker logs -f web
  2. B.docker build -t app:1.0 .
  3. C.docker exec -it web bash
  4. D.docker run -d -p 8080:80 app

Answer + AI explanation with Pro

3. Which statement is correct?

Junior
  1. A.docker build -t app:1.0 . — open an interactive shell inside the already-running container web
  2. B.docker build -t app:1.0 . — upload the tagged image to its remote registry
  3. C.docker build -t app:1.0 . — start a container in the background mapping host port 8080 to container port 80
  4. D.docker build -t app:1.0 . — build an image from the Dockerfile in the current directory and tag it app:1.0

Answer + AI explanation with Pro

4. What does docker run -d -p 8080:80 app do?

Junior
  1. A.list the currently running containers
  2. B.start a container in the background mapping host port 8080 to container port 80
  3. C.upload the tagged image to its remote registry
  4. D.open an interactive shell inside the already-running container web

Answer + AI explanation with Pro

5. Which command will start a container in the background mapping host port 8080 to container port 80?

Junior
  1. A.docker build -t app:1.0 .
  2. B.docker ps
  3. C.docker logs -f web
  4. D.docker run -d -p 8080:80 app

Answer + AI explanation with Pro

6. Which statement is correct?

Junior
  1. A.docker run -d -p 8080:80 app — open an interactive shell inside the already-running container web
  2. B.docker run -d -p 8080:80 app — start a container in the background mapping host port 8080 to container port 80
  3. C.docker run -d -p 8080:80 app — list the currently running containers
  4. D.docker run -d -p 8080:80 app — stream (follow) the stdout/stderr logs of the container named web

Answer + AI explanation with Pro

7. What does docker ps do?

Junior
  1. A.list the currently running containers
  2. B.start a container in the background mapping host port 8080 to container port 80
  3. C.stream (follow) the stdout/stderr logs of the container named web
  4. D.build an image from the Dockerfile in the current directory and tag it app:1.0

Answer + AI explanation with Pro

8. Which command will list the currently running containers?

Junior
  1. A.docker logs -f web
  2. B.docker ps
  3. C.docker exec -it web bash
  4. D.docker run -d -p 8080:80 app

Answer + AI explanation with Pro

9. Which statement is correct?

Junior
  1. A.docker ps — open an interactive shell inside the already-running container web
  2. B.docker ps — list the currently running containers
  3. C.docker ps — stream (follow) the stdout/stderr logs of the container named web
  4. D.docker ps — upload the tagged image to its remote registry

Answer + AI explanation with Pro

10. What does docker logs -f web do?

Junior
  1. A.start a container in the background mapping host port 8080 to container port 80
  2. B.list the currently running containers
  3. C.stream (follow) the stdout/stderr logs of the container named web
  4. D.upload the tagged image to its remote registry

Answer + AI explanation with Pro

11. Which command will stream (follow) the stdout/stderr logs of the container named web?

Junior
  1. A.docker logs -f web
  2. B.docker run -d -p 8080:80 app
  3. C.docker push registry/app:1.0
  4. D.docker ps

Answer + AI explanation with Pro

12. Which statement is correct?

Junior
  1. A.docker logs -f web — build an image from the Dockerfile in the current directory and tag it app:1.0
  2. B.docker logs -f web — stream (follow) the stdout/stderr logs of the container named web
  3. C.docker logs -f web — upload the tagged image to its remote registry
  4. D.docker logs -f web — open an interactive shell inside the already-running container web

Answer + AI explanation with Pro

13. What does docker exec -it web bash do?

Mid
  1. A.start a container in the background mapping host port 8080 to container port 80
  2. B.build an image from the Dockerfile in the current directory and tag it app:1.0
  3. C.open an interactive shell inside the already-running container web
  4. D.upload the tagged image to its remote registry

Answer + AI explanation with Pro

14. Which command will open an interactive shell inside the already-running container web?

Mid
  1. A.docker run -d -p 8080:80 app
  2. B.docker exec -it web bash
  3. C.docker ps
  4. D.docker logs -f web

Answer + AI explanation with Pro

15. Which statement is correct?

Mid
  1. A.docker exec -it web bash — upload the tagged image to its remote registry
  2. B.docker exec -it web bash — list the currently running containers
  3. C.docker exec -it web bash — open an interactive shell inside the already-running container web
  4. D.docker exec -it web bash — stream (follow) the stdout/stderr logs of the container named web

Answer + AI explanation with Pro

16. What does docker push registry/app:1.0 do?

Mid
  1. A.open an interactive shell inside the already-running container web
  2. B.stream (follow) the stdout/stderr logs of the container named web
  3. C.build an image from the Dockerfile in the current directory and tag it app:1.0
  4. D.upload the tagged image to its remote registry

Answer + AI explanation with Pro

17. Which command will upload the tagged image to its remote registry?

Mid
  1. A.docker exec -it web bash
  2. B.docker ps
  3. C.docker run -d -p 8080:80 app
  4. D.docker push registry/app:1.0

Answer + AI explanation with Pro

18. Which statement is correct?

Mid
  1. A.docker push registry/app:1.0 — start a container in the background mapping host port 8080 to container port 80
  2. B.docker push registry/app:1.0 — list the currently running containers
  3. C.docker push registry/app:1.0 — upload the tagged image to its remote registry
  4. D.docker push registry/app:1.0 — build an image from the Dockerfile in the current directory and tag it app:1.0

Answer + AI explanation with Pro

Free to start

Start with a free readiness check

Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Containers · Docker CLI question come with Pro.

Take the free IT readiness check

or take a mock interview set up for this area

24,000+ questions & coding problemsSoftware & IT16,274 questionsGovernment jobs26 examsAptitudenew questions every timeAI practice interviewwith feedback65 topics to practiseMechanical1,149 questionsGATE ME9 papersEngineering Mathematics381 questions2-minute checkfreeDSA Problems1,422Civil1,005 questionsGATE CE9 papersCS Fundamentals1,209 questionsYour scores6 skillsSystem Design25Electrical / EEE1,047 questionsGATE EE9 papersRun your codeC++ · Java · PythonLow-Level Design144Electronics & Comm.975 questionsGATE EC9 papersAI help on every questionFull-Stack6,282Chemical1,005 questionsGATE CH9 papersAI whiteboardsystem designWork abroadEurope · remote · transfersESE ME1 paperGATE practice papers2019–2026ESE CE1 paperDate alertsbefore the last dateESE EE1 paperBehavioural courseHR round practiceESE ET1 paperResume optimizerProSSC JE ME1 paperApplication trackerSSC JE CE1 paperCompany-wise prepSSC JE EE1 paperRole roadmapsRRB JE1 subjectPriced in ₹UPI · cardsISRO SC1 paperGATE CS9 papersIBPS SO IT1 paperUGC NET CS1 paperSSC CGL26 papersIBPS PO26 papersRRB NTPC26 papersSSC CHSL26 papersIBPS Clerk26 papersSBI Clerk26 papersRRB Group D26 papersSSC CPO26 papersSSC GD26 papers