Docker Community Forums

Share and learn in the Docker community.

Docker for Mac Beta; how to keep the same IP address on restart?


(Dave Barnwell) #1

Expected behavior

On starting docker for mac each day it starts at the same IP address if available.

Actual behavior

Docker for Mac increases it’s IP address on each new start.

Information

OS X: version 10.11.4 (build: 15E65)
Docker.app: version v1.11.0-beta7
Running diagnostic tests:
[OK] docker-cli
[OK] Moby booted
[OK] driver.amd64-linux
[OK] vmnetd
[OK] osxfs
[OK] db
[OK] slirp
[OK] menubar
[OK] environment
[OK] Docker
[OK] VT-x
Docker logs are being collected into /tmp/20160420-105708.tar.gz
Most specific failure is: No error was detected
Your unique id is: 2C2A3F57-6F36-4F8A-BB45-8EF65F3DDEF7
Please quote this in all correspondence.

Steps to reproduce the behaviour

Day one IP: 192.168.64.1
close docker for Mac and start again
IP now: 192.168.64.2
etc… each new restart increments the IP address rather than reusing the last one, which is free.


(Onni Hakala) #2

This is causing problems for me as well. With fixed IP addresses it’s easier to build integrations with the docker and host machine.

For example I can’t use dns server in container for local development because the IP-address changes constantly.