When you inject a host directory as /ghost-override, its owner gets replaced by any user on the machine whose uid and gid is 1000. This is because the chown command in start.bash changes not only the owner of the /ghost-override directory inside the container, but also the outside directory to ghost:ghost whose uid and gid are 1000.
Articles with similar issue:
http://stage1.io/blog/managing-permissions-in-your-docker-volumes/
http://chapeau.freevariable.com/2014/08/docker-uid.html
So one dirty solution would be to make an option to pass uid and gid to be used..
When you inject a host directory as
/ghost-override, its owner gets replaced by any user on the machine whose uid and gid is 1000. This is because thechowncommand instart.bashchanges not only the owner of the/ghost-overridedirectory inside the container, but also the outside directory to ghost:ghost whose uid and gid are 1000.Articles with similar issue:
http://stage1.io/blog/managing-permissions-in-your-docker-volumes/
http://chapeau.freevariable.com/2014/08/docker-uid.html
So one dirty solution would be to make an option to pass uid and gid to be used..