2019 DevOps essential interview questions - container and virtualization

Original Address: https://medium.com/edureka/devops-interview-questions-e91a4e6ecbf3
original author: Saurabh Kulshrestha
translated Jun: CODING戴维奥普斯

Let's look at your level of understanding of container and virtual machines.

Q1. What is a container?

Containers offer from the developer's laptop to the test environment, production-like environment from the production environment to a consistent runtime environment.

Then give the definition of a container, the container consists of a complete operating environment consists of: a packaged application, as well as all of its dependencies, libraries and other binary files, and configuration files required to run it together. The application platform and its dependencies of the container, can eliminate the differences between the versions of the operating system and the underlying infrastructure.

image

Q2. Container of virtualization What are the advantages compared to?

The following is a container of the relative benefits of virtualization:

  • Provisioning speed of the vessel provides real-time provisioning and scalability, virtual machines offer a slower
  • Compared with the virtual machine container is a lightweight
  • Compared with the container, the limited performance of the virtual machines
  • Compared with the virtual machine, the container has a better resource utilization

Q3. Container (in our case the middle finger Docker) with hypervisor virtualization (vSphere) What's the difference? What are the benefits?

Here are some differences. Be sure to include these differences in your answer:

image

Q4. What is the Docker mirror?

Docker Docker source image is a container, in other words, the mirror is used to create a container Docker. Use create mirrored build command, the operation start time, they will generate a container. Docker image stored in the registry, such as registry.hub.docker.com, as they may become very large, the mirror is designed to be mirrored by other layers, allowing a minimum amount of data transmitted over the network, the transmission image.

Tip: Please pay attention Dockerhub, in order to answer questions about the pre-usable image.

Q5. What is the Docker containers?

This is a very important issue, so make sure the answer is not off topic, I suggest you follow the following format:
Docker container includes an application and all of its dependencies, but shared with other containers kernel, user space as the host operating system independent process runs. Docker container is not bound to any particular infrastructure: they can be run on any infrastructure and any cloud on any computer.

Now explain how to create a Docker container: Docker can create a mirror and then run it to create Docker containers can also be used on Dockerhub Docker image that already exists.
Docker Docker containers running substantially mirror instance.

Q6. What is the Docker Hub?

Docker Hub is a cloud-based registry service that allows you to link to the code repository, build and test your mirror, mirror and storage manually push links to Docker cloud, so you can deploy the image to the host. It found that the container mirrored throughout the development process, distribution and change management, user and team collaboration, and workflow automation provides centralized resource management.

Q7. Docker containers and other technologies What's the difference?

As far as I know, your answer should include the following:
Docker container is easy to deploy in the cloud. Compared with other technologies, it can run more applications on the same hardware so developers can easily and quickly create a container of the application can be run immediately, and to manage and deploy applications much easier. You can even share the container with your application.

You can also add more points, but make sure the above in your answer.

Q8. What is the Docker Swarm?

It is the Docker's local cluster, will host Docker Docker pool converted into a single virtual host. Docker Swarm provides a standard Docker API, any tool has been communicating with the daemon Docker Swarm can be used transparently extended to multiple hosts.

I also recommend that you mention some of the tools supported by:

  • Dokku
  • Docker Compose
  • Docker Machine
  • Jenkins

Q9. What is the purpose Dockerfile is?

Docker mirror may be automatically constructed by the read command from Dockerfile.

Dockerfile is a configuration file that contains all the user may increase a command to the command line of the mirror combination. Docker constructed using a user may create a plurality of continuously performing automatic construction command line instructions.

Now there may be a few questions to test your experience on the use of Docker.

Q10. Can I use json in Docker in alternative yaml as I compose files?

You can use json as a substitute yaml compose your documents, compose using the json file with, specify a file name, for example:
Docker Docker -f-compose-up compose.json

Q11. How do you use Docker in the past posts?

Here you need to explain how to use the Docker to help rapid deployment, as well as how to write a script Docker, and so on with other tools such as Puppet, Chef Jenkins or use Docker. If you lack previous experience in Docker terms, but have had experience with other tools in a similar field, please inform and explain honestly the same content. In this case, if you can Docker and other tools to compare in terms of functionality, this makes sense.

Q12. How to create a Docker container?

About this I suggest you give a straightforward answer - you can use the following command to create Docker Docker containers Mirror:
Docker RUN -t -i
This command will create and launch container.

You should also mention that if you want to check the status of all hosts on a list of vessels that are running, use the following command:
Docker PS -a

Q13. How do you stop and restart Docker containers?

To stop Docker containers, you can use the following command:
Docker STOP

Now restart Docker containers, you can use the following command:
Docker restart

Q14. Docker container can be extended to what extent?

Like Google and Twitter such a large network deployments, as well as Heroku and DotCloud such a platform vendors are running in container technology, reached hundreds of thousands or even millions of containers running in parallel.

Q15. Docker run on what platform?

First of all, I would say Docker typically runs on Linux and cloud platform, then I will mention the following Linux vendor:

  • Ubuntu 12.04、13.04 等
  • Fedora 19/20+
  • RHEL 6.5+
  • CentOS 6+
  • Gentoo
  • ArchLinux
  • openSUSE 12.3+
  • CRUX 3.0+

Q16. When Docker container quit, I will lose data?

You can reply: When Docker container quit, I will not lose my data. Before you delete a container explicitly, any data written to disk applications will remain in their containers. Even after stopping a container, the container file system still exists.

That's all, I hope these questions will help you crack the DevOps interview!

Guess you like

Origin www.cnblogs.com/codingdevops/p/11573085.html