Run IceCoder in Docker in order to edit code mounter via docker -v option as a specific

48 views
Skip to first unread message

eran liberty

unread,
Dec 11, 2019, 11:35:01 AM12/11/19
to ICEcoder
So I want to run Icecoder in a docker and have it edit code in a mounted directory of the host

something like:
docker run -p 8888:80 -v /home/liberty/path/to/code/on/host/machine/nifty-project:/var/www/html/nifty-project/ docker-repo/icecoder 

Which works great with one huge problem.

on the host machine the code files and directories have the my own ownership liberty.iberty-grp which translate to some numbers that make sense on the host machine, lets say 12345:300

BUT 

Inside the container icecoder wants to write the files as www-data.www-data which translates to some other numbers that make sense only inside the docker image, lets say 5.5

In order for icecoder to be able to edit this mounted directory I must chown the mounted directory to www-data

something like 
chown -R www-data.www-data /var/www/html

but this change will create files on the host with the ownership 5.5 which make any file on the host unreadable by liberty.liberty-grp.

what ideally would have worked best is if docker had some mapping that says when inside the dicker someone write file as 5.5 you will externally write it as 12345:300.

Has this been resolved somewhere?

-- Liberty


 



eran liberty

unread,
Dec 11, 2019, 12:11:21 PM12/11/19
to ICEcoder
Its worth mentioning I am using the latest icecoder code that is loaded from github master along with php7

as can be seen in this docker image which I copied and modified.
Reply all
Reply to author
Forward
0 new messages