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

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.

主站蜘蛛池模板: 城固县| 澄迈县| 乌恰县| 崇左市| 阳泉市| 西充县| 钟山县| 红河县| 曲靖市| 兴宁市| 延长县| 芦山县| 安图县| 五寨县| 夏河县| 乌拉特后旗| 恭城| 金门县| 濉溪县| 奉节县| 岐山县| 沛县| 瑞昌市| 宜宾县| 玉环县| 建阳市| 江华| 合作市| 新兴县| 万安县| 三台县| 聊城市| 稷山县| 通许县| 渭南市| 来凤县| 成安县| 剑河县| 丹东市| 古丈县| 岢岚县|