Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

Docker Interview Questions and Answer Part – 22

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)

Which of the following is needed to deploy a Docker Stack?

  • Compose v2 file format
  • Kubernetes
  • Compose v3 file format (Ans)
  • Docker Cloud

What is the name of the configuration file that describes how to build a new Docker image with your app-code inside?

  • dockerfile (Ans)
  • config.json
  • docker-file
  • dockerfile.json

Which of the following is the worst number of managers for high availability?

  • 1
  • 5
  • 2 (Ans)
  • 7

Which command can you use to get a shell session inside of a container?

  • docker container login
  • docker container exec (Ans)
  • docker container shell
  • docker container ssh

Which Docker EE technology performs layer-7 (application layer) load balancing?

  • The ingress network
  • The Service Mesh
  • The HTTP Routing Mesh (HRM) (Ans)

Which of the following best decribes a Docker Image?

  • A read-write template for starting one or more containers
  • A point-in-time snapshot of a container used for backups
  • A data volume that can be mounted inside of a container
  • A read-only template for starting one or more containers (Ans)

You have two services running on a Swarm, but they cannot find each other by name. Which of the following could be the reason why?

  • They are on different overlay networks (Ans)
  • They were not manually registered with the Swarm DNS when they were created
  • Service discovery only works on bridge/NAT networks
  • You did not create the Swarm DNS

Which of the following is a loose definition of a Docker container?

  • A VM running a shared kernel with resource limits applied
  • A unikernel running on a hypervisor with resource limits applied
  • An isolated area of an Operating System with resource limits applied (Ans)

What will happen if you start a new container or service and specify a volume that does not currently exist?

  • You will be prompted to create the new volume
  • The command will complete but the container/service will fail to start
  • The command will fail
  • Docker will create the volume for you (Ans)

What are the base requirements to be able to use Docker Secrets?

  • Swarm mode and an external CA
  • Swarm mode and self-encrypting disks for the cluster store
  • Docker in Swarm mode (Ans)
  • Docker

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at <a href="https://www.cotocus.com/">Cotocus</a>. I share tech blog at <a href="https://www.devopsschool.com/">DevOps School</a>, travel stories at <a href="https://www.holidaylandmark.com/">Holiday Landmark</a>, stock market tips at <a href="https://www.stocksmantra.in/">Stocks Mantra</a>, health and fitness guidance at <a href="https://www.mymedicplus.com/">My Medic Plus</a>, product reviews at <a href="https://www.truereviewnow.com/">TrueReviewNow</a> , and SEO strategies at <a href="https://www.wizbrand.com/">Wizbrand.</a> Do you want to learn <a href="https://www.quantumuting.com/">Quantum Computing</a>? <strong>Please find my social handles as below;</strong> <a href="https://www.rajeshkumar.xyz/">Rajesh Kumar Personal Website</a> <a href="https://www.youtube.com/TheDevOpsSchool">Rajesh Kumar at YOUTUBE</a> <a href="https://www.instagram.com/rajeshkumarin">Rajesh Kumar at INSTAGRAM</a> <a href="https://x.com/RajeshKumarIn">Rajesh Kumar at X</a> <a href="https://www.facebook.com/RajeshKumarLog">Rajesh Kumar at FACEBOOK</a> <a href="https://www.linkedin.com/in/rajeshkumarin/">Rajesh Kumar at LINKEDIN</a> <a href="https://www.wizbrand.com/rajeshkumar">Rajesh Kumar at WIZBRAND</a> <a href="https://www.rajeshkumar.xyz/dailylogs">Rajesh Kumar DailyLogs</a>

Related Posts

Docker Tutorials: Docker Image – Understanding Dockerfiles instructions & options

Here’s a step-by-step tutorial for Dockerfile, including explanations and examples for each major command. Dockerfile Tutorial A Dockerfile is a text file containing instructions to build a…

Read More

Docker Tutorials: Docker Image – Example and Sample Programs of Dockerfile

Reference Rajesh Kumar I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at Cotocus. I share tech blog at DevOps School, travel stories…

Read More

Docker Tutorials: Installation and Configurations

Docker Installation in Centos/RHEL Method -1: How to install Docker Community Edition via YUM? Step 1 – Install required packages. yum-utils provides the yum-config-manager utility, and device-mapper-persistent-data…

Read More

Docker Tutorials: How to Install Docker in Ubuntu?

Install Docker Engine in Ubuntu NOTE – All commands you must run as root user or add a current user into a linux group name called “docker”…

Read More

Docker Lab, Excercise & Assignment – 7 – Docker Volume

Below is a very detailed tutorial and lab manual for learning Docker Volumes, using the Ubuntu image for practical, hands-on labs. This covers all major types of…

Read More

Docker Lab, Excercise & Assignment – 4 – Docker Networking

Here’s an in-depth, step-by-step tutorial and lab manual for Docker Networking—starting from basics, covering all core concepts, and providing a hands-on guide to every feature and command….

Read More