pclub.in icon indicating copy to clipboard operation
pclub.in copied to clipboard

Docker writing as root

Open yashsriv opened this issue 7 years ago • 5 comments

I am having some issues with mounting with docker as docker writes as root and then my whole build fails locally. Do you have any suggestions??

yashsriv avatar Sep 02 '16 13:09 yashsriv

What docker? o.O this is jekyll site, are you using some container for jekyll builds?

adarshaj avatar Sep 02 '16 14:09 adarshaj

Oh you don't know?? This is repo is now a target for Source Code an event in Takneek. Dockerising is one of the milestones for which each pool will get points :P - https://github.com/pclubiitk/pclub.in/milestone/3

So I was trying out a docker compose setup with the location of the cloned pclub repo as a mountpoint....it mounts and everything but somehow it writes as root causing my normal build to fail

yashsriv avatar Sep 02 '16 14:09 yashsriv

Ah okay, that depends on the source docker image you use, you can always extend the source docker image with a USER xyz in a new Dockerfile so that the uid matches. or you could run a chown -R on generated files too (in this case you take uid/gid as params in docker run)

adarshaj avatar Sep 02 '16 14:09 adarshaj

@yashsriv what is the status of this issue? If you have a build test plan ready, do push :smile:

sakshamsharma avatar Sep 13 '16 11:09 sakshamsharma

I have a dockerfile which can fetch the pclub repo and compile it..but if I try anything related to mounting it messes up... I'll push both the dockerfiles for you to checkout...one works independently..i.e., fetches all dependencies, and works on the pclub repo..the other one mounts the current directory, fetches the dependecies and tries compiling but fails......

yashsriv avatar Sep 13 '16 12:09 yashsriv