cannot ping linked docker container service
having simple setup like this: db: image: mysql web: build: . command: bundle exec rails s -p 3000 -b '0.0.0.0' volumes: - .:/myapp ports: - "3000:3000" links: - db:db environment: RAILS_ENV: development if i run: docker-compose build && docker-compose run web ping db i get: Starting myapp_db_1 ping: unknown host why? if i run: docker-compose run cat /etc/hosts i see this: Starting myapp_db_1 127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters 172.17.0.2 4af9653f843a (value 4af9653f843a changes on each run) i am using docker-compose 1.6.2 and docker version 1.10.3 on mac os x (so virtualbox as well) why does it happen? how can i access db container in web container by hostname?
ok i just realized that i need to run docker-compose up at least once before i can ping it
How should docker-compose jobs discover etcd?
docker compose adding nodes dynamically to nginx frontend
Docker Swarm - dependencies definition
docker-compose volume not mounted
Exposing sentry service in docker-compose file
Yesod and docker-compose logs in development mode
Docker compose to always deploy using latest image
JHipster - Doubts in the development using Microservices Architecture
Gogs + Drone getsockopt: connection refused
Concourse result keeps loading
Docker-compose: AttributeError: 'module' object has no attribute 'ssl'
scaling a service with docker compose
Docker Compose apparently ignores COMPOSE_FILE
Where does Docker install gems on a mac
What is the difference between docker-machine and docker-compose?
Docker Compose port issue. Cannot launch docker project on localhost