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

The roots of containers

Ask the average user what a Docker container is and you might get any one of a dozen responses. You might be told something about lightweight virtual machines, or how it is that this hot new disruptive technology is going to revolutionize computing. In reality, Linux containers are certainly not a new idea, nor are they really all that much like a virtual machine.

Back in 1979, the chroot syscall was added to Version 7 of Unix. Calling chroot changes the apparent root directory for the current running process and its subprocesses. Running a program in a so-called chroot jail prevents it from accessing files outside of the specified directory tree.

One of the first uses of chroot was for testing of the BSD build system, something that is inherited by the package build systems of most of our modern Linux distributions, such as Debian, RedHat, and SuSE. By testing packages in a clean chrooted environment, build scripts can detect missing dependency information.

Chroot is also commonly used to sandbox untrusted processes-for example, shell processes on shared FTP or SFTP servers. Systems designed specifically with security in mind, such as the Postfix mail transfer agent, utilize chroot to isolate individual components of a pipeline in order to prevent a security issue in one component from rippling across the system.

Chroot is in fact a very simple isolation tool that was never intended to provide either security or control over anything other than the filesystem access of the processes. For its intended purpose of providing filesystem isolation for the likes of build tools, it is perfect. But for isolating applications in a production environment, we need a little more control.

主站蜘蛛池模板: 扎囊县| 新邵县| 澄江县| 石渠县| 福建省| 通城县| 凤庆县| 周至县| 新和县| 故城县| 收藏| 夏河县| 富川| 陇南市| 图木舒克市| 芮城县| 克山县| 呼和浩特市| 正定县| 蕲春县| 聊城市| 靖安县| 肇源县| 论坛| 赤水市| 宁都县| 漳州市| 东城区| 石阡县| 萝北县| 寿宁县| 留坝县| 全南县| 满城县| 昌平区| 三原县| 巴里| 扶风县| 贡觉县| 武冈市| 平利县|