Skip to content

Conversation

@Vigilans
Copy link

When using docker to build an intermediate gateway (like raspberry pi), we may expect a following workflow:

  • Set DHCP server's published default gateway to be intermediate gateway's LAN IP;
  • Set intermediate gateway (the docker container)'s default gateway to be router's LAN IP.

However, currently docker-net-dhcp will always use DHCP published gateway when creating the container, and when that published IP is the same as container's lease IP, an error Destination unreachable will raise, preventing us to modify the gateway later after the container created.

Thus, this PR add a new option gateway when creating the docker network, to forcibly uses a user-provided gateway instead of one provided by DHCP when creating the container.

Usage example:
docker create .... -o bridge=br-eth -o gateway=192.168.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant