Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

Docker Interview Questions and Answer Part – 25

Docker Kitematic can ONLY be used to download Docker images.

  • True
  • False (Ans)

Services can be organized into __ with Docker Cloud.

  • roles
  • stacks (Ans)
  • zones
  • groups

Docker works the same way as virtual machines.

  • False (Ans)
  • True

What Docker Compose command can be used to create service images?

  • docker-compose create
  • docker compose
  • docker-compose build (Ans)
  • docker-compose make

Docker Toolbox can only be installed and run on Linux.

  • False (Ans)
  • True

Each instruction in a Dockerfile creates an intermediate container as the image is built.

  • True (Ans)
  • False

What key concepts does Docker rely on?

  • Images and containers (Ans)
  • Images and archives
  • Images and virtual machines
  • Virtual machines and LXC

Setting up communications between multiple containers always requires multiple Docker run statements to be executed.

  • False (Ans)
  • True

Docker volumes are persisted even after a container is deleted.

  • True (Ans)
  • False

Docker Cloud provides a browser-based terminal for services.

  • False
  • True (Ans)

You’ve run the “docker ps” command but no containers are showing. Why?

  • You don’t have an image for the container.
  • All containers are stopped. (Ans)
  • None of these
  • All containers are running.

What options are available for getting source code into Docker Containers?

  • Create a custom docker image with the source code or create a data volume pointing to your dev machine (Ans)
  • Use the Dockerfile “embedcode” instruction
  • Create a custom container with the source code and use the “mount” command to point to your dev machine
  • None of these

What command can be used to “link” a command terminal window to a Docker machine?

  • docker env [machine name]
  • docker-machine environment [machine name]
  • docker-machine env [machine name] (Ans)
  • docker rm [machine name]

What syntax can be used to delete a Docker volume and a container?

  • docker rm remove-volume containerName
  • docker rm -rv containerName
  • docker rm volume containerName
  • docker rm -v containerName (Ans)

VirtualBox is required to use Docker on Mac and Windows dev machines.

  • True (Ans)
  • False

Which of the following use Docker’s layered file system?

  • Docker images only
  • Docker containers only
  • All of these
  • VirtualBox
  • Docker images and containers (Ans)

What syntax can be used to create a volume that Docker manages?

  • docker run -v /temp:/var/temp imageName
  • docker run -vol /temp:/var/temp imageName
  • None of these
  • docker run -v /var/www imageName (Ans)

What syntax can be used to convert a Dockerfile into an Image?

  • docker run -t /tagName .
  • docker create -t /tagName .
  • docker convert -t /tagName .
  • docker build -t /tagName . (Ans)

Which of the following tools are included in Docker Toolbox?

  • Docker Client
  • VirtualBox
  • All of these (Ans)
  • Docker Kitematic
  • Docker Machine

What command can be run to download an image from Docker Hub?

  • docker ps -a
  • docker pull [image name] (Ans)
  • docker rmi [image name]
  • docker images
DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.