Docker Community Forums

Share and learn in the Docker community.

Unable to connect to linked container


(Badllama77) #1

I am using the meteord container with the official mongodb linked through composer.
My docker-compose.uml is as follows.

mongo:
  image: mongo
web:
  build: .
  ports:
   - "8080:80"
  volumes:
   - .:/code
  links:
   - mongo
  environment:
   MONGO_URL: mongodb://mongo/mydb

docker-compose up
results in…
Error: failed to connect to [mongo:27017]

Not sure why this is the case. Any help would be appreciated.