官术网_书友最值得收藏!

  • Docker on Windows
  • Elton Stoneman
  • 267字
  • 2021-07-02 19:53:16

Docker containers

A container is an instance of an application created from an image. The image contains the whole application stack, and it also specifies the process to start the application, so Docker knows what to do when you run a container. You can run multiple containers from the same image, and you can run containers in different ways (I describe them all in the next chapter).

You start your application with docker container run, specifying the name of the image and your configuration options. Distribution is built into the Docker platform, so if you don't have a copy of the image on the host where you're trying to run the container, Docker will pull the image first. Then it starts the specified process, and your app is running in a container.

Containers don't need a fixed allocation of CPU or memory, and the processes for your application can use as much of the host's compute power as they need. You can run dozens of containers on modest hardware, and unless the applications all try and use a lot of CPU at the same time, they will happily run concurrently. You can also start containers with resource limits to restrict how much CPU and memory they have access to.

Docker provides the container runtime as well as image packaging and distribution. In a small environment and in development, you will manage individual containers on a single Docker host, which would be your laptop or a test server. When you move to production, you'll need high availability and the option to scale, and that comes with Docker swarm.

主站蜘蛛池模板: 张家界市| 静乐县| 临海市| 中方县| 马关县| 花垣县| 西昌市| 新野县| 鄄城县| 兴隆县| 江达县| 静安区| 镇巴县| 吴江市| 理塘县| 罗田县| 菏泽市| 巴南区| 溧水县| 龙陵县| 明光市| 富阳市| 汕尾市| 新闻| 张家界市| 渭源县| 洛阳市| 宁津县| 六枝特区| 赣州市| 长宁县| 陆良县| 巴楚县| 普洱| 绥芬河市| 汉川市| 铁岭县| 株洲市| 淮南市| 博罗县| 台前县|