[SOLVED] Docker (meteord) failing to build on Meteor 1.3.2.4


#1

Hi, has anyone had success running a 1.3.2.4 app in Docker with @arunoda 's meteord script? https://github.com/meteorhacks/meteord

Every time I try to run the container I get the following error:

docker run \
>   -e ROOT_URL=http://domain.com \
>   -e MONGO_URL=mongodb://127.0.0.1:27017/meteor \
>   -e PORT=4000 \
>   -e METEOR_SETTINGS="$(cat settings.json)" \
>   -p 4000:4000 \
>   user/project
=> Starting meteor app on port:4000

/built_app/programs/server/node_modules/fibers/future.js:300
						throw(ex);
						      ^
Error: failed to connect to [127.0.0.1:27017]
    at Object.Future.wait (/built_app/programs/server/node_modules/fibers/future.js:420:15)
    at new MongoConnection (packages/mongo/mongo_driver.js:213:27)
    at new MongoInternals.RemoteCollectionDriver (packages/mongo/remote_collection_driver.js:4:16)
    at Object.<anonymous> (packages/mongo/remote_collection_driver.js:38:10)
    at Object.defaultRemoteCollectionDriver (packages/underscore/underscore.js:750:1)
    at new Mongo.Collection (packages/mongo/collection.js:102:40)
    at new KdDataLayer (packages/kadira_debug/lib/server/data_layer.js:8:1)
    at Package (packages/kadira_debug/lib/server/connect.js:24:1)
    at packages/kadira_debug/lib/server/connect.js:267:1
    at packages/kadira_debug/lib/server/connect.js:267:1
    - - - - -
    at [object Object].<anonymous> (/built_app/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/mongodb/connection/server.js:556:74)
    at [object Object].emit (events.js:106:17)
    at [object Object].<anonymous> (/built_app/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:156:15)
    at [object Object].emit (events.js:98:17)
    at Socket.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/mongodb/connection/connection.js:534:10)
    at Socket.emit (events.js:95:17)
    at net.js:441:14
    at process._tickCallback (node.js:448:13)

Running a 1.2.x project, I had no issues. Does anyone have any solutions to this? I saw no issues on the github repo, which makes me think it may just be me, not an issue with the dockerfile.

Thanks!

  • Josh

#2

So I figured it out, you simply need to set the MONGO_URL as the host machines IP, not 127.0.0.1.