Skip to content

Instantly share code, notes, and snippets.

@jfellus
jfellus / README.md
Last active September 26, 2024 21:55
Docker-compose (v2,v3) | Network interfaces order is tied to docker network names lexical order despite priority

Docker-compose network priority won't work, would it be v2 or v3

Deterministic docker-network to container interface is a must in multi-network setups Docker-compose has a priority mechanism to let the containers connect in order to the given networks

However, docker itself doesn't seem to take that into account

Instead, ethX order in the containers is determined by the lexical order of network names

How to reproduce