pclubiitk / pclub.in

Jekyll-based repository for the Programming Club website
http://pclub.in
32 stars 72 forks source link

Docker writing as root #38

Open yashsriv opened 8 years ago

yashsriv commented 8 years ago

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??

adarshaj commented 8 years ago

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

yashsriv commented 8 years ago

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

adarshaj commented 8 years ago

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)

sakshamsharma commented 8 years ago

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

yashsriv commented 8 years ago

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......