diff --git a/README.md b/README.md index 13510dc2b..c1b9a1a52 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ _If you are interested in contributing to kaniko, see [DEVELOPMENT.md](DEVELOPME - [--insecure-pull](#--insecure-pull) - [--no-push](#--no-push) - [--oci-layout-path](#--oci-layout-path) + - [--registry-mirror](#--registry-mirror) - [--reproducible](#--reproducible) - [--single-snapshot](#--single-snapshot) - [--snapshotMode](#--snapshotmode) @@ -441,6 +442,10 @@ Set this flag if you want to pull images from a plain HTTP registry. It is suppo Set this flag if you only want to build the image, without pushing to a registry. +#### --registry-mirror + +Set this flag if you want to use a registry mirror instead of default `index.docker.io`. + #### --reproducible Set this flag to strip timestamps out of the built image and make it reproducible. diff --git a/integration/integration_test.go b/integration/integration_test.go index c443beae5..42bab1011 100644 --- a/integration/integration_test.go +++ b/integration/integration_test.go @@ -171,7 +171,7 @@ func TestMain(m *testing.M) { }, { name: "Building kaniko image using registry-mirror", - command: []string{"docker", "build", "--registry-mirror", "https://mirror.gcr.io", "-t", ExecutorImage, "-f", "../deploy/Dockerfile", ".."}, + command: []string{"docker", "build", "--registry-mirror", "mirror.gcr.io", "-t", ExecutorImage, "-f", "../deploy/Dockerfile", ".."}, }, } diff --git a/pkg/util/image_util_test.go b/pkg/util/image_util_test.go index 59458d3ba..aa9776bdf 100644 --- a/pkg/util/image_util_test.go +++ b/pkg/util/image_util_test.go @@ -102,7 +102,7 @@ func Test_ScratchImageFromMirror(t *testing.T) { actual, err := RetrieveSourceImage(config.KanikoStage{ Stage: stages[1], }, &config.KanikoOptions{ - RegistryMirror: "https://mirror.gcr.io", + RegistryMirror: "mirror.gcr.io", }) expected := empty.Image testutil.CheckErrorAndDeepEqual(t, false, err, expected, actual)