Merge pull request #15 from atosatto/mirror-registry

Adding support to registry mirroring
This commit is contained in:
Brad Rydzewski
2015-11-24 22:50:21 -08:00
2 changed files with 8 additions and 3 deletions

View File

@@ -22,6 +22,7 @@ type Save struct {
type Docker struct {
Storage string `json:"storage_driver"`
Registry string `json:"registry"`
Mirror string `json:"mirror"`
Insecure bool `json:"insecure"`
Username string `json:"username"`
Password string `json:"password"`
@@ -91,6 +92,9 @@ func main() {
if vargs.Insecure && len(vargs.Registry) != 0 {
args = append(args, "--insecure-registry", vargs.Registry)
}
if len(vargs.Mirror) != 0 {
args = append(args, "--registry-mirror", vargs.Mirror)
}
for _, value := range vargs.Dns {
args = append(args, "--dns", value)