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 – 10

What is a dangling volume?

  • The default volume for the container file system that’s unpacked from the image
  • A volume that’s removed from a running container
  • A volume that’s not associated with a container (Ans)
  • A volume created without a name

Which of the following Windows Features do you need to use Windows Server containers?

  • Hyper-V
  • Hyper-V and Containers
  • Containers (Ans)
  • Docker

Which of the following stops all running containers?

  • docker rmi $(docker ps -q)
  • docker rm -f $(docker ps -q)
  • docker rm -f $(docker ps -q) (Ans)
  • docker halt $(docker ps -q)

In the past, to find software, we often used standalone web sites hosted by the creator of the software. Now, with Docker, how do we discover software?

  • Docker Engine
  • Docker Hub (Ans)
  • App Stores
  • Package Managers
  • Still use standalone web sites

What does docker history do?

  • Shows container history
  • Shows commands that we ran inside a given container
  • Shows a diff of changes in the container layer
  • Shows image history (Ans)

When executing the command “docker pull microsoft/aspnet:4.6.2” what is the “microsoft” piece called?

  • User (Ans)
  • Repository
  • Registry
  • Tag
  • Image

How are image layers coalesced to form a container’s file system?

  • A union file system is used to create a union mount point (Ans)
  • Files are copied out of layers when creating a container into a union mount point
  • Container file systems exist in memory, in a RAM disk, aggregated from image layers

What docker command executes software?

  • docker run (Ans)
  • docker ps
  • docker stop
  • docker pull

Images contain the entire user space, in other words the entire file system for a container. How is this not horribly inefficient in terms of disk space?

  • Images use state of the art compression to reduce the disk space requirements
  • Image layers are highly optimized to reduce unnecessary components.
  • You only pull down the image layers that you need to run your application
  • Images are layered and common layers are shared (Ans)

With Docker for Windows, what container types can you run?

  • Windows and Linux (Ans)
  • Windows and macOS
  • Only Windows
  • Only Linux

When executing the command “docker pull microsoft/aspnet:4.6.2” what is the “aspnet” piece called?

  • User
  • Repository (Ans)
  • Tag
  • Registry
  • Image

What’s a good analogy for docker stop?

  • Removes the container
  • Stops the processes running in a container (Ans)
  • Stops a single process in a container
  • Uninstalls the container

Removing an image is akin to what in traditional software management?

  • Uninstalling an application
  • Restarting an application
  • Stopping an application
  • Deleting an installer file or zip file (Ans)

Which of the following commands will start a new container on the same nodes as container C1?

  • docker run -d -e affinity==c1 nginx
  • docker run -d -e constraint:container==c1 nginx
  • docker run -d -e affinity:container==c1 nginx (Ans)
  • docker run -d -e constraint==c1 nginx

Which of the following flags tells the Docker daemon to listen on the network using the default secured Docker port?

  • -H tcp://0.0.0.0:3375
  • -H tcp://0.0.0.0:2376 (Ans)
  • -H tcp://0.0.0.0:2375
  • -H tcp://0.0.0.0:3376

Which of the following flags turns on TLS authentication for the Docker daemon?

  • –tlscert
  • –tlsauthenticate
  • –tlsenable
  • –tlsverify (Ans)

How are custom labels implemented?

  • They are stored in an external KV store
  • They are applied to the Docker Engine daemon at startup (Ans)
  • They are applied to the Docker host as environment variables
  • A custom metadata container runs on the Docker host

How does Swarm support a pluggable discovery service backend?

  • Using libstorage as an abstraction layer
  • Using libkv as an abstraction layer (Ans)
  • By publishing an open API that key-value stores can work with

Which of the following is the default scheduling strategy for Swarm clusters?

  • Stack
  • Spread (Ans)
  • Random
  • Binpack

Which of the following Swarm components support High Availability?

  • Swarm manager and directory service
  • Swarm manager and discovery service (Ans)
  • Swarm manager and scheduling service
  • Just the Swarm manager

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

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.