From cd124c3ac500a803ad80c15563448009dae7e6d0 Mon Sep 17 00:00:00 2001 From: Kirilll Zaycev Date: Sat, 28 Nov 2015 00:27:01 +0300 Subject: [PATCH 1/2] Bip support for docker --- main.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 84944ec..27a9e20 100644 --- a/main.go +++ b/main.go @@ -14,9 +14,9 @@ import ( type Save struct { // Absolute or relative path - File string `json:"destination"` + File string `json:"destination"` // Only save specified tags (optional) - Tags StrSlice `json:"tag"` + Tags StrSlice `json:"tag"` } type Docker struct { @@ -32,6 +32,7 @@ type Docker struct { Tag StrSlice `json:"tag"` File string `json:"file"` Context string `json:"context"` + Bip string `json:"bip"` Dns []string `json:"dns"` Load string `json:"load"` Save Save `json:"save"` @@ -72,13 +73,13 @@ func main() { } // Get absolute path for 'save' file if len(vargs.Save.File) != 0 { - if ! filepath.IsAbs(vargs.Save.File) { + if !filepath.IsAbs(vargs.Save.File) { vargs.Save.File = filepath.Join(workspace.Path, vargs.Save.File) } } // Get absolute path for 'load' file if len(vargs.Load) != 0 { - if ! filepath.IsAbs(vargs.Load) { + if !filepath.IsAbs(vargs.Load) { vargs.Load = filepath.Join(workspace.Path, vargs.Load) } } @@ -95,6 +96,9 @@ func main() { if len(vargs.Mirror) != 0 { args = append(args, "--registry-mirror", vargs.Mirror) } + if len(vargs.Bip) != 0 { + args = append(args, "--bip", vargs.Bip) + } for _, value := range vargs.Dns { args = append(args, "--dns", value) From 2cf2312cedc64f5d8368b8a24b3cbdccbb5d00d2 Mon Sep 17 00:00:00 2001 From: Kirilll Zaycev Date: Sat, 28 Nov 2015 00:30:33 +0300 Subject: [PATCH 2/2] Added bip to docs --- DOCS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/DOCS.md b/DOCS.md index e6bc354..43490d5 100644 --- a/DOCS.md +++ b/DOCS.md @@ -9,6 +9,7 @@ The following parameters are used to configure this plugin: * `tag` - repository tag for the image * `insecure` - enable insecure communication to this registry * `mirror` - use a mirror registry instead of pulling images directly from the central Hub +* `bip` - use for pass bridge ip * `storage_driver` - use `aufs`, `devicemapper`, `btrfs` or `overlay` driver * `save` - save image layers to the specified tar file (see [docker save](https://docs.docker.com/engine/reference/commandline/save/)) * `file` - absolute / relative destination path