在docker中运行chroot [英] run chroot within docker

查看:528
本文介绍了在docker中运行chroot的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个商业应用程序,它在chroot环境中提供:启动脚本正在制作chroot,然后启动exe。

I've a commercial app, that is shipped in a chroot environment : the startup script is making the chroot, and starting the exe.

该应用程序很漂亮复杂,并且出于支持目的,我不想更改所有环境。

The App is pretty complex, and also for support purposes, I don't want to change the all environment.

是否可以运行chroot,并在docker中启动服务?还是这两个不兼容?

Is it possible to run chroot, and start the service in docker ? Or are the two incompatible ?

推荐答案

可以在容器内制作chroot ...但是,如 在Docker容器内解除引导,您可能需要以特权模式运行

It is possible to make a chroot inside a container... but, as mentioned in "debootstrap inside a docker container", you might need to run with the privileged mode.

docker run --privileged




默认情况下,Docker容器是无特权的,例如,不能在Docker容器内运行Docker守护程序。

这是因为默认情况下,不允许容器访问任何设备,但是授予特权容器访问所有设备的权限。

By default, Docker containers are "unprivileged" and cannot, for example, run a Docker daemon inside a Docker container.
This is because by default a container is not allowed to access any devices, but a "privileged" container is given access to all devices.

关于请求docker支持特权操作的巨大讨论
到目前为止,
,它不会发生。

There was a huge discussion for requesting docker to support privileged operations.
So far, it is not happening.

这篇关于在docker中运行chroot的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆