Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Docker Interview Questions and Answer Part – 23

Which of the following are top-level keys in a stack file (Compose v3 file)?

  • Version, deployments, networks, volumes
  • Version and services
  • Version, services, networks, volumes (Ans)
  • Services, pods, networks, volumes

Which of the following is an advantage of Multi-stage Builds?

  • Multi-platform images
  • Better image documentation
  • Faster image builds
  • Smaller images (Ans)

Which of the following is a recommended number of Swarm managers for high availability?

  • 4
  • 3 (Ans)
  • 2

Which of the following best describes a Bridge (NAT on Windows) network in Docker?

  • Token-ring
  • Multi-host overlay network
  • A single-host network (Ans)

How does the HRM know how to route traffic to the correct service?

  • iptables rules
  • It inspects HTTP host headers (Ans)
  • DNS labels
  • Custom load balancer rules

By default, where are Docker daemon logs sent to on a Linux system running systemd?

  • syslog
  • The Linux event viewer
  • journald (Ans)

Which of the following is a major goal of Docker volumes?

  • Data replication
  • Data encryption at-rest
  • Object storage
  • Persistent data (Ans)
  • RAID

Which are the two major kernel building blocks that containers are built from?

  • Capabilities and seccomp
  • Namespaces and kernels
  • Namespaces and control groups
  • Capabilities and control groups (Ans)

Which of the following is a recommended best practice?

  • Keep your images small (Ans)
  • Never use the latest image in a repo
  • Use large images containing lots of tools
  • Only use Docker Hub

Where are Secrets mounted on Linux-based Docker hosts?

  • An encrypted volume mounted at /run/secrets
  • An in memory (tempfs) volume at /run/secrets (Ans)
  • initramfs
  • Solid state volume

How are Docker Secrets created on the command line?

  • docker secret create (Ans)
  • docker swarm secret create
  • They cannot be created on the command line

Which of the following is the best high-level description of a Swarm?

  • A secure cluster of Docker nodes (Ans)
  • A tightly-coupled cluster of Docker container
  • A secure cluster of Docker containers
  • I tightly-coupled cluster of Linux nodes

What is the atomic unit of scheduling in Docker?

  • The service
  • The container (Ans)
  • The pod
  • The stack
  • The swarm

Which of the following commands lets you deploy a Docker Stack called stack1 using a Compose file called myapp.yml?

  • docker service deploy -c myapp.yml stack1
  • docker stack deploy -c myapp.yml stack1 (Ans)
  • docker stack deploy stack1 myapp.yml
  • docker service deploy stack1 myapp.yml

Which of the following open-source tools is the underlying technology for Docker Swarm?

  • containerd
  • SwarmKit (Ans)
  • Kubernetes
  • InfraKit
  • The Docker daemon

Docker UCP implements RBAC via Grants. Which of the following make up a Grant?

  • Subjects, roles, and nodes
  • Subjects, roles, and collections (Ans)
  • Roles and collections

Which of the following built-in Docker networks creates a single layer-2 container-only network across multiple Docker hosts that can be on different underlying networks?

  • Bridge
  • MACVLAN
  • Overlay (Ans)
  • NAT

Which Docker command shows the network ports that a container is exposed on?

  • docker container ports
  • docker port (Ans)
  • docker network –port

What happens when you perform a docker volume rm against a volume attached to a running container?

  • The command will fail (Ans)
  • The volume will be deleted
  • The volume and the container will be deleted
  • You will be asked to confirm the command

Which set of container-related Linux tools did Docker’s libcontainer replace?

  • LXD
  • libc
  • AUFS
  • LXC (Ans)

How can you make a Docker Secret available to a standalone container (not a service replica)?

  • You cannot (Ans)
  • Make sure it us running on an overlay network
  • Make sure it is on a node running in Swarm mode

Which Docker technology allows you to manage an entire application comprising multiple Docker Services?

  • Service Mesh
  • Stacks (Ans)
  • Bundles

Which are the two major Docker container orchestrators?

  • Swarm and VMware vSphere
  • Swarm and Marathon
  • Swarm and Kubernetes (Ans)
  • Kubernetes and VMware vSphere
Rajesh Kumar
Follow me
Latest posts by Rajesh Kumar (see all)