From Docker 1.2 onwards, we can give access of the host device to a container with the --device option, following the run command. Earlier, you had to bind-mount it with the -v option, and that had to be done with the --privileged option.
Accessing the host device inside a container
Getting ready
Ensure that the Docker daemon is running on the host and can be connected through the Docker client. You will also need a device to pass the container to.
How to do it...
You can give access of a host device to the container using the following syntax:
docker container run...