Containers · Docker CLI interview questions

18 real Containers · Docker CLI questions from the MLOps & Integration bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

Free to start

Answers, AI explanations, and a scored voice mock interview

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.

Practice Containers · Docker CLI free