Upgraded to use newest version of mongo & fixed data volume binds #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
bowline was building and relying on the deprecated `dockerfile/mongodb'
https://registry.hub.docker.com/u/deprecateddockerfile/mongodb/
mongo has moved to 'library/mongo' and command syntax has changed somewhat
https://registry.hub.docker.com/_/mongo/
I upgraded the build_it and run_it scripts to use the newer and maintained version of mongo.
Due to an unrelated issue with container permissions I was unable to get the scripts to execute.
On line 30 of
build_it.sh
:docker run -d -v $MONGO_DIR:/data/db --name temp_mongo library/mongo
(port binding to 27017 is now done automagically by mongo)
This container would exit as soon as it was started, meaning the link on line 36:
would fail, because you cannot link to a dead container.
The
temp_mongo
container was crashing and burning due to an error:That chown call comes from line 9 of the
docker_entrypoint.sh
script that is part of the mongo container.https://github.com/docker-library/mongo/blob/master/3.0/docker-entrypoint.sh
The 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.https://docs.docker.com/reference/run/#runtime-privilege-linux-capabilities-and-lxc-configuration
After adding the
--privileged
flag to lines that had previously error'd out inbuild_it.sh
andrun_it.sh
I successfully* ran a locally hosted Bowline on my CentOS 7 box with Docker 1.6.0.