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

  • Kubernetes on AWS
  • Ed Robinson
  • 283字
  • 2021-06-10 18:41:21

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.

主站蜘蛛池模板: 富裕县| 安乡县| 石河子市| 丘北县| 连江县| 苍溪县| 漾濞| 杂多县| 巴南区| 延津县| 上栗县| 曲阜市| 铜山县| 渭南市| 湾仔区| 上犹县| 高州市| 东乌| 常德市| 西和县| 商水县| 贵阳市| 濉溪县| 海宁市| 镶黄旗| 正镶白旗| 万年县| 茂名市| 平罗县| 石渠县| 涞水县| 兴海县| 古浪县| 灵川县| 遵义市| 南宫市| 高雄市| 香格里拉县| 康定县| 长沙县| 乌鲁木齐市|