readme: add --registry-mirror
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
This commit is contained in:
		
							parent
							
								
									73f7ea0d2c
								
							
						
					
					
						commit
						6e2287c969
					
				|  | @ -46,6 +46,7 @@ _If you are interested in contributing to kaniko, see [DEVELOPMENT.md](DEVELOPME | ||||||
|     - [--insecure-pull](#--insecure-pull) |     - [--insecure-pull](#--insecure-pull) | ||||||
|     - [--no-push](#--no-push) |     - [--no-push](#--no-push) | ||||||
|     - [--oci-layout-path](#--oci-layout-path) |     - [--oci-layout-path](#--oci-layout-path) | ||||||
|  |     - [--registry-mirror](#--registry-mirror) | ||||||
|     - [--reproducible](#--reproducible) |     - [--reproducible](#--reproducible) | ||||||
|     - [--single-snapshot](#--single-snapshot) |     - [--single-snapshot](#--single-snapshot) | ||||||
|     - [--snapshotMode](#--snapshotmode) |     - [--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. | 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 | #### --reproducible | ||||||
| 
 | 
 | ||||||
| Set this flag to strip timestamps out of the built image and make it reproducible. | Set this flag to strip timestamps out of the built image and make it reproducible. | ||||||
|  |  | ||||||
|  | @ -171,7 +171,7 @@ func TestMain(m *testing.M) { | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			name:    "Building kaniko image using registry-mirror", | 			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", ".."}, | ||||||
| 		}, | 		}, | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -102,7 +102,7 @@ func Test_ScratchImageFromMirror(t *testing.T) { | ||||||
| 	actual, err := RetrieveSourceImage(config.KanikoStage{ | 	actual, err := RetrieveSourceImage(config.KanikoStage{ | ||||||
| 		Stage: stages[1], | 		Stage: stages[1], | ||||||
| 	}, &config.KanikoOptions{ | 	}, &config.KanikoOptions{ | ||||||
| 		RegistryMirror: "https://mirror.gcr.io", | 		RegistryMirror: "mirror.gcr.io", | ||||||
| 	}) | 	}) | ||||||
| 	expected := empty.Image | 	expected := empty.Image | ||||||
| 	testutil.CheckErrorAndDeepEqual(t, false, err, expected, actual) | 	testutil.CheckErrorAndDeepEqual(t, false, err, expected, actual) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue