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

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.
主站蜘蛛池模板: 远安县| 灵宝市| 樟树市| 柳河县| 蕉岭县| 措美县| 丹寨县| 临高县| 封开县| 大竹县| 凤凰县| 吉安市| 宁化县| 修水县| 健康| 霞浦县| 体育| 苏尼特左旗| 吉水县| 丰原市| 宣威市| 社旗县| 望都县| 阜南县| 子洲县| 滦南县| 兴山县| 南华县| 天津市| 泗洪县| 尖扎县| 体育| 盘锦市| 明光市| 莆田市| 南乐县| 濮阳市| 郧西县| 北安市| 大石桥市| 隆尧县|