Can not unmount a device using "umount" in Docker

I found the solution :

In default docker run it's not a real Operating system as we expect. It doesn't have permissions to access the devices. So we have to use --privileged While running a 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.

When the operator executes docker run --privileged, Docker will enable to access to all devices on the host as well as set some configuration in AppArmor to allow the container nearly all the same access to the host as processes running outside containers on the host.

Tags:

Docker

Build