mirror of
https://github.com/thegeeklab/wp-docker-buildx.git
synced 2024-11-25 09:10:39 +00:00
added mtu param
This commit is contained in:
parent
619c7905ec
commit
91eb6ee5ee
1
DOCS.md
1
DOCS.md
@ -15,6 +15,7 @@ Use the Docker plugin to build and push Docker images to a registry. The followi
|
||||
* `storage_driver` - use `aufs`, `devicemapper`, `btrfs` or `overlay` driver
|
||||
* `storage_path` - location of docker daemon storage on disk
|
||||
* `build_args` - [build arguments](https://docs.docker.com/engine/reference/commandline/build/#set-build-time-variables-build-arg) to pass to `docker build`
|
||||
* `mtu` - custom [mtu settings](https://docs.docker.com/v1.8/articles/networking/#docker0) when starting the docker daemon
|
||||
|
||||
The following is a sample Docker configuration in your .drone.yml file:
|
||||
|
||||
|
6
main.go
6
main.go
@ -58,6 +58,11 @@ func main() {
|
||||
Usage: "docker daemon bride ip address",
|
||||
EnvVar: "PLUGIN_BIP",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "daemon.mtu",
|
||||
Usage: "docker daemon custom mtu setting",
|
||||
EnvVar: "PLUGIN_MTU",
|
||||
},
|
||||
cli.StringSliceFlag{
|
||||
Name: "daemon.dns",
|
||||
Usage: "docker daemon dns server",
|
||||
@ -164,6 +169,7 @@ func run(c *cli.Context) {
|
||||
Debug: c.Bool("daemon.debug"),
|
||||
Bip: c.String("daemon.bip"),
|
||||
DNS: c.StringSlice("daemon.dns"),
|
||||
MTU: c.String("daemon.mtu"),
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,7 @@ type (
|
||||
Debug bool // Docker daemon started in debug mode
|
||||
Bip string // Docker daemon network bridge IP address
|
||||
DNS []string // Docker daemon dns server
|
||||
MTU string // Docker daemon mtu setting
|
||||
}
|
||||
|
||||
// Login defines Docker login parameters.
|
||||
@ -206,6 +207,9 @@ func commandDaemon(daemon Daemon) *exec.Cmd {
|
||||
for _, dns := range daemon.DNS {
|
||||
args = append(args, "--dns", dns)
|
||||
}
|
||||
if len(daemon.MTU) != 0 {
|
||||
args = append(args, "--mtu", daemon.MTU)
|
||||
}
|
||||
return exec.Command(dockerExe, args...)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user