Automation, Containerization/Docker Interview: 14 Questions You Should Be Prepared To Answer

This is a list of awesome Containerization/Docker Interview Questions for Testers. These are shared with in one of our groups. Please email us at i.m@fullstackqe.org, we will give the credit to the awesome person who prepared this list.

Q14. What platforms does Docker run on?

Docker runs on only Linux and Cloud platforms.

Below vendors of Linux:
• Ubuntu 12.04, 13.04 et al
• Fedora 19/20+
• RHEL 6.5+
• CentOS 6+
• Gentoo
• ArchLinux
• openSUSE 12.3+
• CRUX 3.0+

Cloud:
• Amazon EC2
• Google Compute Engine
• Microsoft Azure
• Rackspace

Note that Docker does not run on Windows or Mac.

Q11. How to create Docker container?

We can use Docker image to create Docker container by using the below command:

docker run -t -i <image name> <command name>

This command will create and start container.
You should also add, If you want to check the list of all running container with
status on a host use the below command:

docker ps -a

Q9. What is Dockerfile used for?

Docker can build images automatically by reading the instructions from a Dockerfile.
A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image. Using docker build users can create an automated build that executes several command-line instructions in succession.

Q8. What is Docker Swarm?

It is native clustering for Docker which turns a pool of Docker hosts into a single, virtual Docker host. Docker Swarm serves the standard Docker API, any tool that already communicates with a Docker daemon can use Swarm to transparently scale to multiple hosts.
Some supported tools:
• Dokku
• Docker Compose
• Docker Machine
• Jenkins

Q7. How is Docker different from other container technologies?

Docker containers are easy to deploy in a cloud. It can get more applications running on
the same hardware than other technologies, it makes it easy for developers to quickly
create, ready-to-run containerized applications and it makes managing and deploying
applications much easier. You can even share containers with your applications.
If you have some more points to add you can do that but make sure the above the above
explanation is there in your answer.

Q6. What is Docker hub?

Docker hub is a cloud-based registry service which allows you to link to code repositories, build your images and test them, stores manually pushed images, and links to Docker cloud so you can deploy images to your hosts. It provides a centralized resource for container image discovery, distribution and change management, user and team collaboration, and workflow automation throughout the development pipeline.