{"action":"created","issue":{"url":"https://api.github.com/repos/sameersbn/docker-postgresql/issues/34","labels_url":"https://api.github.com/repos/sameersbn/docker-postgresql/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/sameersbn/docker-postgresql/issues/34/comments","events_url":"https://api.github.com/repos/sameersbn/docker-postgresql/issues/34/events","html_url":"https://github.com/sameersbn/docker-postgresql/issues/34","id":94469399,"number":34,"title":"initdb: could not create directory \"/var/lib/postgresql/9.4/main\": Permission denied","user":{"login":"mrh666","id":6307174,"avatar_url":"https://avatars.githubusercontent.com/u/6307174?v=3","gravatar_id":"","url":"https://api.github.com/users/mrh666","html_url":"https://github.com/mrh666","followers_url":"https://api.github.com/users/mrh666/followers","following_url":"https://api.github.com/users/mrh666/following{/other_user}","gists_url":"https://api.github.com/users/mrh666/gists{/gist_id}","starred_url":"https://api.github.com/users/mrh666/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrh666/subscriptions","organizations_url":"https://api.github.com/users/mrh666/orgs","repos_url":"https://api.github.com/users/mrh666/repos","events_url":"https://api.github.com/users/mrh666/events{/privacy}","received_events_url":"https://api.github.com/users/mrh666/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-11T12:29:20Z","updated_at":"2015-07-11T20:12:32Z","closed_at":null,"body":"Can't start postgres container on Mac OS, docker 1.6.2:\r\n\r\n```\r\n> mkdir -p /Users/username/docker-gitlab/postgresql && chmod 0777 /Users/username/docker-gitlab/postgresql\r\n\r\n> docker run --privileged --name=postgresql-gitlab -d   --env='DB_NAME=gitlabhq_production'  --env='DB_USER=gitlab' --env='DB_PASS=password'  --volume=/Users/username/docker-gitlab/postgresql:/var/lib/postgresql   sameersbn/postgresql:9.4\r\n1334c50d0e2fa75afa4f491a8d2f62baab52042efe76240e0a01592d23ee404b\r\n\r\n> docker ps -a\r\nCONTAINER ID        IMAGE                      COMMAND             CREATED             STATUS                     PORTS               NAMES\r\n1334c50d0e2f        sameersbn/postgresql:9.4   \"/start\"            5 seconds ago       Exited (1) 4 seconds ago                       postgresql-gitlab\r\n\r\n> docker logs 1334c50d0e2f\r\nfind: `/var/lib/postgresql/[0-9].[0-9]/main': No such file or directory\r\nInitializing database...\r\ninitdb: could not create directory \"/var/lib/postgresql/9.4/main\": Permission denied\r\n```\r\n\r\nAny idea how can I fix it or apply some workaround?\r\n\r\nThank you"},"comment":{"url":"https://api.github.com/repos/sameersbn/docker-postgresql/issues/comments/120658097","html_url":"https://github.com/sameersbn/docker-postgresql/issues/34#issuecomment-120658097","issue_url":"https://api.github.com/repos/sameersbn/docker-postgresql/issues/34","id":120658097,"user":{"login":"mrh666","id":6307174,"avatar_url":"https://avatars.githubusercontent.com/u/6307174?v=3","gravatar_id":"","url":"https://api.github.com/users/mrh666","html_url":"https://github.com/mrh666","followers_url":"https://api.github.com/users/mrh666/followers","following_url":"https://api.github.com/users/mrh666/following{/other_user}","gists_url":"https://api.github.com/users/mrh666/gists{/gist_id}","starred_url":"https://api.github.com/users/mrh666/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrh666/subscriptions","organizations_url":"https://api.github.com/users/mrh666/orgs","repos_url":"https://api.github.com/users/mrh666/repos","events_url":"https://api.github.com/users/mrh666/events{/privacy}","received_events_url":"https://api.github.com/users/mrh666/received_events","type":"User","site_admin":false},"created_at":"2015-07-11T20:12:32Z","updated_at":"2015-07-11T20:12:32Z","body":"@sameersbn I use boot2docker, not a Vagrant. But anyway issue the same. I moved to docker 1.7. Trying different directories: /opt/postgres, /tmp/postgres. Same issues. Any kind of directory permissions, privileged mode doesn't help.\r\n\r\nSome other ideas?"}}