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

The docker history command shows output similar to which of the following?

  • Dockerfile (Ans)
  • docker-compose.yml
  • docker images
  • docker layers
  • docker ps

What is a tag?

  • A reference to a registry
  • A reference to a specific image in a repository (Ans)
  • A reference to a specific image in a registry
  • A reference to a repository

What format does Docker use to export images?

  • iso
  • Image
  • dmg
  • tar (Ans)
  • zip

Which of the following container types doesn’t use namespace isolation?

  • Windows Server Container
  • Linux Container
  • Hyper-V Container (Ans)

Where do dangling images typically come from?

  • When you stop many of the same containers
  • When building custom docker images (Ans)
  • When running lots of containers from the same image
  • When downloading images from Docker hub

In the past, we usually downloaded software in some sort of package to install it, for example a zip file or MSI file. Now, with Docker, how do we download software?

  • docker start
  • docker download
  • docker pull (Ans)
  • docker ps

Where are created, modified, and deleted files stored in a container?

  • In a volume mounted in the container
  • In an R/W container layer (Ans)
  • In the top most layer from the image it was created from
  • In the bottom most layer from the image it was created from

How can you connect a container to a user defined network?

  • docker attach
  • docker connect
  • –net NETWORK_NAME (Ans)
  • –udf NETWORK_NAME
  • docker disconnect

What is used to resolve ip addresses with the embedded DNS in user-defined networks? What value is pulled from the docker-compose.yml file?

  • Image name
  • Service name (Ans)
  • environment
  • DNS name

Why are image layers read only?

  • So they can be reused (Ans)
  • So we cannot write data inside a container
  • So they can be compressed to reduce disk space

What is a Docker volume?

  • The host file system
  • A directory that mounts remote files
  • A directory that bypasses the container’s union file system (Ans)
  • The union file system for a container

When you extract an image with docker save what is inside the tar archive?

  • A folder for the entire image and also a layers folder with each layer nested inside
  • The contents of all layers flattened into one folder
  • A folder for each image layer (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?

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

Which of the following is an accurate statement about processes in a container?

  • Container processes do not show in the Windows Task Manager
  • Container processes run in a VM
  • Container processes are different from machine processes
  • Container processes are regular machine processes (Ans)

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?

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

Why does Docker for Windows need Hyper-V?

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

How is it possible that we can run a command prompt in a container created from the microsoft/dotnet image?

  • We have access to all apps on the machine in addition to those in the container
  • Common OS applications like CMD.exe are mapped into the container by default
  • It’s not possible to run anything but the one application provided by the image
  • The image also provides CMD.exe (Ans)

After stopping a container, how do you run the application in it again?

  • docker run
  • docker start (Ans)
  • docker pull
  • docker restart

What does the -d in docker run -d nginx do?

  • Deletes the container when we stop the NGINX proces
  • Runs an attached container
  • Runs a container that will display output from the NGINX process in our console
  • Runs a detached container (Ans)

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