I am trying to mount a host directory into a Docker container so that any updates done on the host is reflected into the Docker containers.
Where am I doing somethin
I found that any directory laying under system directive like /var
, /usr
, /etc
could not be mount under the container.
The directive should be at user's space -v
switch instructs docker daemon to mount local directory to the container, for example:
docker run -t -d -v /{local}/{path}:/{container}/{path} --name {container_name} {imagename}