I'm running MongoDB in Docker for a side-project, and am using the stackbrew image from the Docker registry, since it seems that's the most like an officially-supported image.
My Dockerfile is as below... Oh, and it might not be the tidiest Dockerfile you've ever seen, but I can get to that later on ;)
Forking allows me to keep MongoDB running in the background, and setting up a log is a prerequisite for daemonizing MongoDB.
When running this Dockerfile through docker build, I'm told that during mongoimport, a connection to
127.0.0.1:27017 is being refused. I've tried diagnosing this with some common tools, like lsof, netstat and a few others, but either I come across containerisation woes, or I get no meaningful pointers.
Oddly, there's no init scripts in /etc/init or /etc/init.d relating to Mongo, which made me think that it probably wasn't installing. But, if I run `mongo --version` and `mongod --version`, I get told 2.6.7 is in use, which is as expected.
Any advice appreciated!
Thanks,
--
Andrew Langhorn
Web Operations
Government Digital Service
a: 6th Floor, Aviation House, 125 Kingsway, London, WC2B 6NH