{"action":"created","issue":{"url":"https://api.github.com/repos/dougbtv/bowline/issues/10","labels_url":"https://api.github.com/repos/dougbtv/bowline/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/dougbtv/bowline/issues/10/comments","events_url":"https://api.github.com/repos/dougbtv/bowline/issues/10/events","html_url":"https://github.com/dougbtv/bowline/pull/10","id":84225144,"number":10,"title":"Upgraded to use newest version of mongo & fixed data volume binds","user":{"login":"mut3","id":6261098,"avatar_url":"https://avatars.githubusercontent.com/u/6261098?v=3","gravatar_id":"","url":"https://api.github.com/users/mut3","html_url":"https://github.com/mut3","followers_url":"https://api.github.com/users/mut3/followers","following_url":"https://api.github.com/users/mut3/following{/other_user}","gists_url":"https://api.github.com/users/mut3/gists{/gist_id}","starred_url":"https://api.github.com/users/mut3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mut3/subscriptions","organizations_url":"https://api.github.com/users/mut3/orgs","repos_url":"https://api.github.com/users/mut3/repos","events_url":"https://api.github.com/users/mut3/events{/privacy}","received_events_url":"https://api.github.com/users/mut3/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-02T21:43:42Z","updated_at":"2015-06-03T13:20:09Z","closed_at":"2015-06-03T13:15:01Z","pull_request":{"url":"https://api.github.com/repos/dougbtv/bowline/pulls/10","html_url":"https://github.com/dougbtv/bowline/pull/10","diff_url":"https://github.com/dougbtv/bowline/pull/10.diff","patch_url":"https://github.com/dougbtv/bowline/pull/10.patch"},"body":"bowline was building and relying on the deprecated `dockerfile/mongodb' \r\nhttps://registry.hub.docker.com/u/deprecateddockerfile/mongodb/\r\n\r\nmongo has moved to 'library/mongo' and command syntax has changed somewhat\r\nhttps://registry.hub.docker.com/_/mongo/\r\n\r\nI upgraded the build_it and run_it scripts to use the newer and maintained version of mongo. \r\n\r\nDue to an unrelated issue with container permissions I was unable to get the scripts to execute.\r\n\r\nOn line 30 of `build_it.sh`:\r\n```bash\r\ndocker run -d -v $MONGO_DIR:/data/db --name temp_mongo library/mongo\r\n```\r\n(port binding to 27017 is now done automagically by mongo)\r\n\r\nThis container would exit as soon as it was started, meaning the link on line 36:\r\n```bash \r\ndocker run -it --rm --link temp_mongo:mongo -v $EXAMPLE_DATA:/exampledata/ library/mongo \\...\r\n```\r\nwould fail, because you cannot link to a dead container.\r\n\r\nThe `temp_mongo` container was crashing and burning due to an error:\r\n```\r\nchown: cannot read directory `/data/db': Permission denied\r\n```\r\nThat chown call comes from line 9 of the `docker_entrypoint.sh` script that is part of the mongo container.\r\nhttps://github.com/docker-library/mongo/blob/master/3.0/docker-entrypoint.sh\r\n\r\nThe solution for this error, which would kill any `docker run` command with a `-v` data volume bind to a local directory, is to have the container run in `--privileged` mode, allowing it to access the host file system.\r\nhttps://docs.docker.com/reference/run/#runtime-privilege-linux-capabilities-and-lxc-configuration\r\n\r\nAfter adding the `--privileged` flag to lines that had previously error'd out in `build_it.sh` and `run_it.sh` I successfully ran a locally hosted Bowline on my CentOS 7 box with Docker 1.6.0."},"comment":{"url":"https://api.github.com/repos/dougbtv/bowline/issues/comments/108405434","html_url":"https://github.com/dougbtv/bowline/pull/10#issuecomment-108405434","issue_url":"https://api.github.com/repos/dougbtv/bowline/issues/10","id":108405434,"user":{"login":"dougbtv","id":5472189,"avatar_url":"https://avatars.githubusercontent.com/u/5472189?v=3","gravatar_id":"","url":"https://api.github.com/users/dougbtv","html_url":"https://github.com/dougbtv","followers_url":"https://api.github.com/users/dougbtv/followers","following_url":"https://api.github.com/users/dougbtv/following{/other_user}","gists_url":"https://api.github.com/users/dougbtv/gists{/gist_id}","starred_url":"https://api.github.com/users/dougbtv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougbtv/subscriptions","organizations_url":"https://api.github.com/users/dougbtv/orgs","repos_url":"https://api.github.com/users/dougbtv/repos","events_url":"https://api.github.com/users/dougbtv/events{/privacy}","received_events_url":"https://api.github.com/users/dougbtv/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T13:20:09Z","updated_at":"2015-06-03T13:20:09Z","body":"@mut3 -- thanks again! Appreciated it. Realized on your profile, you're also in Burlington, VT. Small world, as I am too. You should come drop by LaboratoryB.org and our spot on pine street at some point, I owe you a beer (or tea, if that's how you roll). Thanks Will."}}