Strider-CD / strider-docker-slave

Base docker image for running Strider jobs
4 stars 14 forks source link

.npm folder access problems #2

Closed dboek closed 9 years ago

dboek commented 9 years ago

Running a test crashes, because npm tries to create the folder /home/strider/.npm and looking at the directory structure in a running docker container /home/strider seems to be owned by root ....

Might need an extra?

RUN chown strider /home/strider
knownasilya commented 9 years ago

@dboek feel free to submit a PR :smile_cat:

jfromaniello commented 9 years ago

I've the same problem, and I did docker pull to get latest version of the image. Is the image a trusted docker image (i.e. built automatically on docker servers)?

My workaround so far has been to add a HOME=/home/strider/workspace variable with strider-env.

knownasilya commented 9 years ago

@jfromaniello a PR (by @dboek) has been merged that adds the fix, so give master a try and see if that fixes your issue as well.

jfromaniello commented 9 years ago

yes, doesn't fix this problem:

$ sudo docker run -it strider/strider-docker-slave /bin/bash
strider@7ac498f481b5:~/workspace$ ls -lah ~/
total 24K
drwxr-xr-x 4 root    root    4.0K Sep 12 15:27 .
drwxr-xr-x 5 root    root    4.0K Sep 12 15:27 ..
-rw-r--r-- 1 strider strider  220 Sep 10 13:13 .bash_logout
-rw-r--r-- 1 strider strider 3.6K Sep 10 13:13 .bashrc
-rw-r--r-- 1 strider strider  675 Sep 10 13:13 .profile
drwxr-xr-x 2 strider root    4.0K Sep 10 13:13 workspace
strider@7ac498f481b5:~/workspace$ whoami
strider
strider@7ac498f481b5:~/workspace$ mkdir ~/.npm/
mkdir: cannot create directory '/home/strider/.npm/': Permission denied