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

Immutable infrastructure with containers

Containerization consists of deploying applications in containers instead of deploying them in VMs.

Today, it is very clear that the container technology to be used is Docker and that the configuration of a Docker image is also done in code in a Dockerfile. This file contains the declaration of the base image, which represents the bone to be used, the installation of additional middleware to be installed on the image, only the files and binaries necessary for the application, and the network configuration of the ports. Unlike VMs, containers are said to be immutable; the configuration of a container cannot be modified during its execution.

Here is a simple example of a Dockerfile:

FROM ubuntu
RUN apt-get update
RUN apt-get install -y nginx
ENTRYPOINT ["/usr/sbin/nginx","-g","daemon off;"]
EXPOSE 80

In this Docker image, we use a basic Ubuntu image, install nginx, and expose port 80.

The Docker part will be discussed in detail in Chapter 7, Containerizing Your Application with Docker.
主站蜘蛛池模板: 蒙山县| 上杭县| 伊宁县| 霸州市| 饶阳县| 岑巩县| 灵璧县| 普定县| 方城县| 观塘区| 潢川县| 隆化县| 龙井市| 东辽县| 拉孜县| 仙居县| 电白县| 永靖县| 五家渠市| 本溪| 宁远县| 丹江口市| 名山县| 保靖县| 上蔡县| 黄浦区| 商都县| 息烽县| 珲春市| 安宁市| 普格县| 准格尔旗| 江陵县| 昌宁县| 义马市| 台北市| 深水埗区| 临沧市| 延安市| 启东市| 德州市|