Add support for insecure docker registry (#131)

* Add support for insecure docker registry

Using --insecure-skip-tls-verify

Fixes #110

* Apply formatting
This commit is contained in:
Carlos Sanchez
2018-04-20 10:47:06 -07:00
committed by dlorenc
parent 3d84cf39fa
commit 08ce2a0724
3 changed files with 15 additions and 12 deletions
+3 -2
View File
@@ -48,7 +48,7 @@ func NewSourceImage(srcImg string) (*img.MutableSource, error) {
}
// PushImage pushes the final image
func PushImage(ms *img.MutableSource, destImg string) error {
func PushImage(ms *img.MutableSource, destImg string, dockerInsecureSkipTLSVerify bool) error {
srcRef := &img.ProxyReference{
ImageReference: nil,
Src: ms,
@@ -65,7 +65,8 @@ func PushImage(ms *img.MutableSource, destImg string) error {
opts := &copy.Options{
DestinationCtx: &types.SystemContext{
DockerRegistryUserAgent: fmt.Sprintf("kaniko/executor-%s", version.Version()),
DockerRegistryUserAgent: fmt.Sprintf("kaniko/executor-%s", version.Version()),
DockerInsecureSkipTLSVerify: dockerInsecureSkipTLSVerify,
},
}
return copy.Image(policyContext, destRef, srcRef, opts)