mal / docker-for-mac-host-bridge

Host-accessible containers with Docker for Mac
125 stars 23 forks source link

Any way in which to specific a static IP address for the acme network? #8

Closed ashmckenzie closed 2 years ago

mal commented 6 years ago

That should be possible, you'll need to alter this line and have a look at the options available. I've not had need to do this for quite some time, but I believe you have to set several options together to define the IP pool and gateway for a network.

The install.sh script doesn't hardcode any IPs, so it should automatically pick up from the metadata any IP gateway changes you make to link in the host correctly.

ashmckenzie commented 6 years ago

Thanks Mal :)

On Thu, Apr 19, 2018 at 7:31 PM, Mal Graty notifications@github.com wrote:

That should be possible, you'll need to alter this line https://github.com/mal/docker-for-mac-host-bridge/blob/3c35c534bea7a346cf0d72ebe820975337757537/install.sh#L106 and have a look at the options available https://docs.docker.com/engine/reference/commandline/network_create/. I've not had need to do this for quite some time, but I believe you have to set several options together to define the IP pool and gateway for a network.

The install.sh script doesn't hardcode any IPs, so it should automatically pick up from the metadata any IP gateway changes you make to link in the host correctly.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mal/docker-for-mac-host-bridge/issues/8#issuecomment-382672017, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAlNY4QXX4mFbXPid6N4-_9TiidKx-3ks5tqFl8gaJpZM4TbOYk .

-- Ash.