{"action":"created","issue":{"url":"https://api.github.com/repos/docker-library/official-images/issues/1132","labels_url":"https://api.github.com/repos/docker-library/official-images/issues/1132/labels{/name}","comments_url":"https://api.github.com/repos/docker-library/official-images/issues/1132/comments","events_url":"https://api.github.com/repos/docker-library/official-images/issues/1132/events","html_url":"https://github.com/docker-library/official-images/pull/1132","id":111784763,"number":1132,"title":"Couchbase: Address difficulties with bind-mounts on MacOS","user":{"login":"ceejatec","id":1460419,"avatar_url":"https://avatars.githubusercontent.com/u/1460419?v=3","gravatar_id":"","url":"https://api.github.com/users/ceejatec","html_url":"https://github.com/ceejatec","followers_url":"https://api.github.com/users/ceejatec/followers","following_url":"https://api.github.com/users/ceejatec/following{/other_user}","gists_url":"https://api.github.com/users/ceejatec/gists{/gist_id}","starred_url":"https://api.github.com/users/ceejatec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceejatec/subscriptions","organizations_url":"https://api.github.com/users/ceejatec/orgs","repos_url":"https://api.github.com/users/ceejatec/repos","events_url":"https://api.github.com/users/ceejatec/events{/privacy}","received_events_url":"https://api.github.com/users/ceejatec/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker-library/official-images/labels/library/couchbase","name":"library/couchbase","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-16T08:23:02Z","updated_at":"2015-10-16T22:45:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker-library/official-images/pulls/1132","html_url":"https://github.com/docker-library/official-images/pull/1132","diff_url":"https://github.com/docker-library/official-images/pull/1132.diff","patch_url":"https://github.com/docker-library/official-images/pull/1132.patch"},"body":"This change ensures the \"couchbase\" user in the Docker container is UID 1000, to match the \"docker\" user in the boot2docker VM. It was previously UID 999, which caused failure to start when bind-mounting /opt/couchbase/var on MacOS. This issue is discussed (at great, great length) at https://github.com/boot2docker/boot2docker/issues/581 .\r\n\r\n@tianon , @yosifkit - IMHO it'd be a really good idea to add a note to https://docs.docker.com/articles/dockerfile_best-practices/ suggesting that if you are running non-root processes in your container and you expect users to bind-mount volumes that those processes will write to, you should ensure those processes run as UID 1000 to ensure compatibility with boot2docker.\r\n\r\n(This change also adds port 8093 to the list of EXPOSEd ports for Couchbase, mostly as a documentation point.)"},"comment":{"url":"https://api.github.com/repos/docker-library/official-images/issues/comments/148857677","html_url":"https://github.com/docker-library/official-images/pull/1132#issuecomment-148857677","issue_url":"https://api.github.com/repos/docker-library/official-images/issues/1132","id":148857677,"user":{"login":"ceejatec","id":1460419,"avatar_url":"https://avatars.githubusercontent.com/u/1460419?v=3","gravatar_id":"","url":"https://api.github.com/users/ceejatec","html_url":"https://github.com/ceejatec","followers_url":"https://api.github.com/users/ceejatec/followers","following_url":"https://api.github.com/users/ceejatec/following{/other_user}","gists_url":"https://api.github.com/users/ceejatec/gists{/gist_id}","starred_url":"https://api.github.com/users/ceejatec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceejatec/subscriptions","organizations_url":"https://api.github.com/users/ceejatec/orgs","repos_url":"https://api.github.com/users/ceejatec/repos","events_url":"https://api.github.com/users/ceejatec/events{/privacy}","received_events_url":"https://api.github.com/users/ceejatec/received_events","type":"User","site_admin":false},"created_at":"2015-10-16T22:45:41Z","updated_at":"2015-10-16T22:45:41Z","body":"> Would this new UID have any implications to current users that have the old UID if they upgrade their container and reuse the data directory?\r\n\r\nFortunately no, since the run script already does a \"chmod -R couchbase:couchbase var\" when the container starts. Turns out that chmod is a no-op in boot2docker configs, but when running on Linux it takes effect - I tested it.\r\n\r\n> Also, I would recommend removing the RUN chmod 755 /etc/service/couchbase-server/run in your Dockerfiles and just checking in the chmod to git. \r\n\r\nWhoops, I actually thought I'd already done that. I did remove the corresponding chmod for the entrypoint.sh, but overlooked the run script. I'll push a fix."}}