Access docker container from host using containers name
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am developing a service and using there docker compose to spin services like postgres, redis, elasticsearch. I have a web application that is based on RubyOnRails and writes and reads from all those services. Here is my docker-compose.yml version: '2' services: redis: image: redis:2.8 networks: - frontapp elasticsearch: image: elasticsearch:2.2 networks: - frontapp postgres: image: postgres:9.5 environment: POSTGRES_USER: elephant POSTGRES_PASSWORD: smarty_pants POSTGRES_DB: elephant volumes: - /var/lib/postgresql/data networks: - frontapp