1

I download latest node images from docker, and try to run a container with the following command:

$ sudo docker run -it -v $(pwd)/app:/home/node/app --name node node /bin/bash

Then the container was created and I get into the /home/node/app dir. I tried 'ls' command and get 'permission deny'.

I do search online, someone suggests change owner of app/ at the host to 1000. But it doesn't work.

Here is some information I think may be helpful:

$ id //at the host
uid=1000(qwang) gid=1000(qwang) groups=1000(qwang),10(wheel) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

$ id //in the container 'node'
uid=0(root) gid=0(root) groups=0(root)
$ id node //in the container  'node'
uid=1000(node) gid=1000(node) groups=1000(node)

$ ls -al //pwd => /home/node
drwxr-xr-x. 3 node node   69 Jul 19 13:51 .
drwxr-xr-x. 3 root root   18 Jul  8 04:16 ..
-rw-r--r--. 1 node node  220 Nov  5  2016 .bash_logout
-rw-r--r--. 1 node node 3515 Nov  5  2016 .bashrc
-rw-r--r--. 1 node node  675 Nov  5  2016 .profile
drwxrwxr-x. 2 node node 4096 Jul 19 13:50 app

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.