-
Notifications
You must be signed in to change notification settings - Fork 324
add iptables option to the daemon #309
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
base: master
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -103,6 +103,11 @@ func main() { | |
| Usage: "docker daemon executes in debug mode", | ||
| EnvVar: "PLUGIN_DEBUG,DOCKER_LAUNCH_DEBUG", | ||
| }, | ||
| cli.BoolTFlag{ | ||
| Name: "daemon.iptables", | ||
| Usage: "docker daemon enable addition of iptables rules", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also consider changing the description to make it clear that this flag disables iptable rules, instead of enabling |
||
| EnvVar: "PLUGIN_IPTABLES", | ||
|
||
| }, | ||
| cli.BoolFlag{ | ||
| Name: "daemon.off", | ||
| Usage: "don't start the docker daemon", | ||
|
|
@@ -285,6 +290,7 @@ func run(c *cli.Context) error { | |
| Disabled: c.Bool("daemon.off"), | ||
| IPv6: c.Bool("daemon.ipv6"), | ||
| Debug: c.Bool("daemon.debug"), | ||
| IPTables: c.Bool("daemon.iptables"), | ||
|
||
| Bip: c.String("daemon.bip"), | ||
| DNS: c.StringSlice("daemon.dns"), | ||
| DNSSearch: c.StringSlice("daemon.dns-search"), | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,7 @@ type ( | |
| StoragePath string // Docker daemon storage path | ||
| Disabled bool // DOcker daemon is disabled (already running) | ||
| Debug bool // Docker daemon started in debug mode | ||
| IPTables bool // docker daemon enable/disable addition of iptables rules | ||
| Bip string // Docker daemon network bridge IP address | ||
| DNS []string // Docker daemon dns server | ||
| DNSSearch []string // Docker daemon dns search domain | ||
|
|
@@ -370,6 +371,9 @@ func commandDaemon(daemon Daemon) *exec.Cmd { | |
| if daemon.Experimental { | ||
| args = append(args, "--experimental") | ||
| } | ||
| if daemon.IPTables { | ||
|
||
| args = append(args, "--iptables") | ||
| } | ||
| return exec.Command(dockerdExe, args...) | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be
Boolinstead ofBoolT. TheBoolTparameter defaults totrueif unset, however, in this case I think we want to disable to false and only disable IP tables if the user explicitly sets this value totrue