I’m running my app with Docker using mLab for my Mongo ddbb. I’d like to use another container with Mongo and link this with my app but I can’t figure out how can I do this.
So far I’ve created 2 container images running well separately: one for my app and another one with a mongo instance.
In my app container I had this env var:
But I got an error saying that it couldn’t connect so I run
docker inspect [mongo_container_id] and I had a look to the JSON displayed and changed my env var with the IPAddress under NetworkSettings:
But now I get a different error (attached img):
I don’t get this running my app locally. Should I change my docker file?
FROM node:6.9 ENV METEOR_ALLOW_SUPERUSER=true ENV ROOT_URL="http://localhost:3000" RUN curl "https://install.meteor.com/" | sh COPY . /usr/src/app WORKDIR /usr/src/app #RUN chmod -R 700 /usr/src/app/.meteor/local RUN meteor npm install EXPOSE 3000 CMD ["npm", "start"]
I also tried another way, linking both images with this:
docker run --link mongo -P recipic (mongo and recipic and the names of my images). Found here: https://github.com/drobbins/docker-meteor-base
But I get this error:
Similar to: Docker Error with Meteor