Relative Content

Tag Archive for dockerdocker-composedocker-network

why does docker compose still create an implicit network

services: echo: image: busybox command: echo 7 server: build: . command: server 0.0.0.0:8000 healthcheck: test: /app/compose-tinker poke localhost:8000 interval: 1s retries: 10 client: build: . command: client server:8000 tty: true stdin_open: true depends_on: server: condition: service_healthy networks: my_network: {} here’s my compose file. notice that the toplevel networks declares a my_network network and none of […]

Restricting default docker-compose networks

My machine is connected to the physical network 192.168.0.0/24, which also has an internet-of-things VLAN 107 at 192.168.107.0/24. After messing around with some docker containers, that host suddenly lost access to VLAN 107. What happened was that a bridge network was created by docker-compose, and although these are usually at 172.x.0.0/16, this one was created at 192.168.96.0/20; indeed, 192.168.96.0/20 contains all of 192.168.107.0/24, so ip route get 192.168.107.100 resolved to that bridge device.

Why is an alias in a docker network not resolved?

I am making a docker setup for a class on microservices I am taking. Can someone please tell me why the frontend container cannot make requests to the Flask server running on the user container through it’s alias? The aliasing does seems to work between the connection of the user and user-db containers, so why not between the user and frontend containers?