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

By default, what happens to a Docker Container when the process it is running exits?

  • The Container exits. (Ans)
  • The Container reboots and restarts the process.
  • The Container performs a crash dump.
  • The Container continues running in detached mode with a Bash prompt available.

Which of the following commands will install the Docker engine on a CentOS server?

  • yum install docker.io
  • apt-get install docker.io
  • yum install docker (Ans)
  • apt-get install docker

In a default installation, how does the Docker daemon natively access features like kernel namespaces and cgroups?

  • via capabilities
  • via devicemapper
  • via LXC
  • via libcontainer (Ans)

How are comments added to a Dockerfile?

  • Any line starting with a # (Ans)
  • Any text following a #
  • Any text following //
  • Any line starting with //

Which Dockerfile Instruction must be the first Instruction in a Dockerfile?

  • MAINTAINER
  • RUN
  • A comment
  • FROM (Ans)

Which transient image layer exists below the rootfs while a container starts?

  • The datalink layer
  • Layer 1
  • Block aggregation layer
  • Bootfs (Ans)

Which Dockerfile instruction defines the base image to build from?

  • BASEIMAGE
  • FROM (Ans)
  • BaseImage
  • BASE

At the time of recording the course, what is the default storage driver used by CentOS for Docker containers?

  • OverlayFS
  • NTFS.SYS
  • AUFS
  • devicemapper (Ans)

Which of the following is the correct way to name a Dockerfile?

  • DockerFile
  • DOCKERFILE
  • Dockerfile (Ans)
  • dockerfile

Which of the following is true about RUN Instructions in a Dockerfile?

  • All RUN lines are compiled down to a single RUN Instruction
  • Each Dockerfile can only contain one
  • Each new RUN line creates a new image layer (Ans)
  • RUN Instructions only work with containers that have elevated privileges

From a Docker Host, which command can we use to stop a container?

  • docker stp
  • docker halt
  • docker stop (Ans)
  • docker-stop

Which of the following is another term to describe container virtualization?

  • Storage virtualization
  • Hypervisor virtualization
  • OS level virtualization (Ans)
  • Software Defined Data Center

What is a dangling volume?

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

What image type is blessed by both Docker and the people behind the software it contains?

  • Blessed
  • Official (Ans)
  • Trusted
  • Automated Build

What does docker history do?

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

Why does Docker for Windows need Hyper-V?

  • To run windows containers inside a Windows Server VM and linux containers inside a linux VM
  • To run windows containers inside a Windows Server VM
  • To run linux containers inside a linux VM
  • To run linux containers inside a linux VM and Hyper-V windows containers (Ans)

In the past we had to install software before we could run it. What is the equivalent step with Docker to be able to run software?

  • Run a container
  • Installs a container
  • Create a container (Ans)
  • Pulls a container

What docker command executes software?

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

When executing the command “docker pull microsoft/aspnet:4.6.2” what does “microsoft/aspnet:4.6.2” refer to?

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

When using docker-compose, by default, what network are linux containers connected to?

  • host
  • none
  • bridge
  • user defined network (Ans)

Find Trusted Cardiac Hospitals

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

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

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 Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I…

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