-
Notifications
You must be signed in to change notification settings - Fork 255
docker compose up does not allocate static IP properly #1582
Comments
Hello, I got the Docker Desktop 3.5.1 on MacOS and now docker-compose and docker compose are running the same binary and the issue exposed here is present. Do I have to change something in the docker-compose.yml file to have the new implementation work? Here is my current docker version: Client: Server: Docker Engine - Community |
@LaendaEagle there is a switch in the Desktop settings in the Experimental section to go back to Compose V1. |
But it looks like this should have been fixed almost two months ago and should have been shipped with Desktop 3.5.1. |
OK, I unchecked the usage of compose v2. I don't know why it got checked (perhaps a mistake I did), thank you for your quick answer :) And yeah, I am testing docker compose with my setup every new release of Docker Desktop and the issue is still there. |
Because we are including some users randomly selected into the Compose V2 canary rollout, see «Compose V2 beta» in the release notes. |
No problem, I found good to have the possibility to access beta in one click so we can test new stuff easily. And for a dev environment it is good to be on the latest release possible for the need we have. |
Just to give you a feedback, Docker Desktop 3.5.2 contains the correction and it is working like a charm :) |
BUG REPORT INFORMATION
Description
I have multiple applications managed in multiple projects. For some technical reason I need those applications to run on the same network with fixed IPs (as the IP is stored in some places).
For that I have a docker-compose.yml setting the network up with appropriate driver and range. Then I refer to this network from my other docker-compose.yml file where I assign the IP address to my application.
All this work fine with docker-compose up but the fixed IP is not allocated with docker compose up instead the next free IP of my named network is used.
Just to be clear I restate it: this is working with docker-compose, not with the docker compose new flavour available with Docker Desktop 3.3.1 (Mac).
Steps to reproduce the issue:
Describe the results you received:
The IP of my application's container is 172.22.0.3
Describe the results you expected:
The IP of my application's container is 172.22.0.18
Additional information you deem important (e.g. issue happens only occasionally):
file: network/docker-compose.yml
file: application/docker-compose.yml
Output of
docker version
:The text was updated successfully, but these errors were encountered: