Closed
Description
When saving a file by running an application in a Docker container to an host mounted directory, that file results to be owned by the root user in the host file system.
For example:
docker run -v $PWD:/data ubuntu touch /data/hello
ls -la
drwxr-xr-x 2 pditommaso foo 4096 Dec 13 11:44 .
drwxr-xr-x 3 pditommaso foo 4096 Dec 9 14:43 ..
-rw-r--r-- 1 root root 0 Dec 13 12:30 hello
The host OS is: CentOS release 6.5 (Final)
Linux kernel: 2.6.32-431.el6.x86_64
docker version
Client version: 0.7.0
Go version (client): go1.1.2
Git commit (client): 0ff9bc1/0.7.0
Server version: 0.7.0
Git commit (server): 0ff9bc1/0.7.0
Go version (server): go1.1.2
Last stable version: 0.7.1, please update docker
docker info
Containers: 304
Images: 43
Driver: devicemapper
Pool Name: docker-253:0-1705509-pool
Data file: /var/lib/docker/devicemapper/devicemapper/data
Metadata file: /var/lib/docker/devicemapper/devicemapper/metadata
Data Space Used: 15837.8 Mb
Data Space Total: 102400.0 Mb
Metadata Space Used: 27.9 Mb
Metadata Space Total: 2048.0 Mb
Username: pditommaso
Registry: https://index.docker.io/v1/
Metadata
Assignees
Labels
No labels
Activity