Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

run chroot within docker

Tags:

docker

chroot

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.

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

like image 678
OpenStove Avatar asked Oct 20 '15 11:10

OpenStove


1 Answers

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

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.

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

like image 87
VonC Avatar answered Sep 29 '22 06:09

VonC