🚀 DevOps & SRE Certification Program 📅 Starting: 1st of Every Month 🤝 +91 8409492687 🔍 Contact@DevOpsSchool.com

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

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

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

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

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

What does docker-compose help us avoid? Excessive calls to ________?

  • docker stop
  • docker build
  • docker rm
  • docker run (Ans)
  • docker pull

What is a Docker volume?

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

How can you get files out of a container onto the host? Assume a process in a container is writing files, like ffmpeg saving the contents of a converted video.
Where do you write this data?

  • Write files to a volume mounted from the host (Ans)
  • Write files to the default host file system mounts at C:\host or /mnt/host on Linux
  • Write files to network shares
  • Write files to the container file system, all writes are automatically copied to the host file system in the same folder

On Windows 10 which container types can you run?

  • Hyper-V Containers (Ans)
  • Windows 10 Containers
  • Both Hyper-V and Windows Server Containers
  • Windows Server Containers

In the past, we often download applications packaged in a zip file, or MSI, or some other package format. With Docker, what format is used to distribute software?

  • Image (Ans)
  • DMG
  • ISO
  • Zip file
  • VHD

Which of the following allows you to add files from the host to a running container?

  • docker cp (Ans)
  • docker volumes
  • docker add
  • docker commit
  • docker share

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

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

What’s a good analogy for docker stop?

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

To get Ctrl+C to work to kill a container, what should you pass when running the container?

  • –name
  • -it (Ans)
  • -p
  • -d

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

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

What format does Docker use to export images?

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

On Windows Server 2016 which container types can you run?

  • Both Hyper-V and Windows Server Containers (Ans)
  • Windows Server Containers
  • Windows 10 Containers
  • Hyper-V Containers

Where do dangling images typically come from?

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

Why do containers exist?

  • To make it easier to use virtual machines
  • A replacement for monolithic operating systems
  • A replacement for virtual machines
  • To make it easier to use software (Ans)

What’s a good analogy for docker exec?

  • Allows you to run additional processes in new containers
  • It’s similar to installing software
  • Allows you to run additional processes in a container (Ans)
  • Allows you to run additional processes outside a container

What is a repository on Docker Hub?

  • An image ta
  • A user account
  • A single image
  • A collection of images (Ans)

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?

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

How can I run another process inside a running container?

  • docker start
  • docker ps
  • docker run
  • docker exec (Ans)

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.