I would like to communicate between two containers. I've read that networks
should be configured either locally or in bridge mode. However, in this example below, adminer
has access to mysql
, but no network were configured.
I tried to add another service ubuntu
install nmap and docker-compose run ubuntu nmap 127.0.0.1
, but MySQL isn't accessible. How does adminer
can reach db
container in this example?
version: '3.1'
services:
adminer:
image: adminer
restart: always
ports:
- 8080:8080
db:
image: mysql:5.6
restart: always
environment:
MYSQL_ROOT_PASSWORD: example