Docker Interview Questions and Answer Part – 35

What Docker technologies are available to support communication between containers?

  • Docker connect and bridge networks
  • Docker linking and bridge networks (Ans)
  • Docker connect and alias networks
  • None of these

Bridge networks can be defined in Docker Compose files.

  • False
  • True (Ans)

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

  • docker images
  • docker rmi [image name]
  • docker pull [image name] (Ans)
  • docker ps -a

Docker Kitematic can ONLY be used to download Docker images.

  • False (Ans)
  • True

Docker Kitematic provides a way to visually search for images hosted on __?

  • VirtualBox
  • Docker Hub (Ans)
  • Docker Client
  • Docker Machine

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

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

Which of the following options can be used in a Docker Compose file?

  • env_file
  • container_name
  • All of these (Ans)
  • networks

Environment variables can be defined in Docker Compose files.

  • False
  • True (Ans)

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

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

Which of the following statements accurately describe a Docker volume?

  • All of these (Ans)
  • Can be shared and reused among containers
  • Persisted even after a container is deleted
  • Are not affected by updates to images
  • Special type of directory in a container

What key concepts does Docker rely on?

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

What command-line switches are used with legacy linking?

  • –net and –name
  • –link and –name (Ans)
  • –com and –name
  • –run and –link

Docker volumes are persisted even after a container is deleted.

  • False
  • True (Ans)

What tool can be used to visually work with images and containers?

  • Docker Engine
  • Docker Kitematic (Ans)
  • None of these
  • VirtualBox

Which of the following tasks can Docker Cloud perform?

  • All of these (Ans)
  • Create nodes
  • None of these
  • Create stacks
  • Start and stop services

Dockerfile contains binary instructions.

  • True
  • False (Ans)

What command-line switch can be used to define a custom Dockerfile file name (such as node.dockerfile) when building a custom image?

  • -t
  • -customfile
  • -f (Ans)
  • -v

What Docker Client command can be used to create a container network?

  • docker createNetwork
  • docker build network
  • docker network create (Ans)
  • docker ps network

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

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

What task does Docker Machine perform?

  • Create and manage Docker images
  • Find and install Docker images
  • Create and manage containers
  • All of these
  • Create and manage local machines (Ans)

Docker Cloud provides a browser-based terminal for services.

  • True (Ans)
  • False

Docker Toolbox can only be installed and run on Linux.

  • False (Ans)
  • True

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

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

What syntax can be used to publish an image to Docker Hub?

  • docker create /imageName
  • docker publish /imageName
  • docker move /imageName
  • docker push /imageName (Ans)

What benefits do container networks offer?

  • Allow local containers to communicate with external host containers
  • Allow local containers to communicate directly with host processes
  • Allow containers to communicate with each other in an isolated network (Ans)
  • All of these

Docker containers can be started and stopped.

  • False
  • True (Ans)

Docker Images consist of read-only layers.

  • True (Ans)
  • False
Rajesh Kumar
Follow me