Docker Community Forums

Share and learn in the Docker community.

Access denied: docker run with options --user and -v


(Pebbe) #1

Docker version 1.11.2

I run this command on Linux:

docker run \
       --net=host \
       --user=`id -u`:`id -g` \
       --rm \
       -i -t \
       -e DISPLAY \
       -v $HOME/tmp:/work/data \
       rugcompling/alpino:latest

I get:

docker: Error response from daemon: stat /home/myname/tmp: permission denied.

$HOME/tmp is owned by the user, and has access drwxr-xr-x

The directory $HOME (also owned by owner) has access drwxr-x---
When I change this to drwxr-xr-x the problem disappears, but I don’t want to do that.
Is there another solution?


(Pebbe) #2

This happens on an nfs4 mounted file system.

On a regular, local file system, this problem does not occur.