Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support 'gateway' option when creating network #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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