Commit Graph

226 Commits

Author SHA1 Message Date
Christophe 236ba5690e
Add archive notice to README (#3502) 2025-06-03 10:36:10 -04:00
Aaron Prindle f087f4ac24
docs: document --no-push-cache flag in README.md (#3188) 2024-06-04 15:09:08 -04:00
Djabx c3131238c4
docs: update docs on mirrors and registry map. (#3153)
* docs: update docs on mirrors and registry map.

* Update README.md

---------

Co-authored-by: Aaron Prindle <aprindle@google.com>
2024-05-13 22:35:35 -07:00
Verlhac Gaëtan d070187005
fix(doc): wiki url (#3117) 2024-04-19 10:39:42 -07:00
Matheus Pimenta 8bbd69d8a1
Add --push-ignore-immutable-tag-errors boolean CLI option (#2774) 2024-02-29 10:05:58 -08:00
Oliver Radwell 47d7f7e92b
docs: fix broken links and redirects (#3009) 2024-02-29 10:03:58 -08:00
schwannden 20a6ab560e
feat: add skip tls flag for private git context (#2854)
If git clone context is a private self-signed repository, we allow user
to add --git insecure-skip-tls=true flag in the option. The value is
default to false, this behavior is in accordance with the go-git
package.
2024-02-28 23:18:41 -08:00
Sacha Smart 818b1392e0
feat: add support for no push environment variable (#2983)
* feat: add support for no push environment variable

* Update to Readme

* feat: add support for no push environment variable


Update to Readme
2024-02-22 20:20:41 -05:00
JeromeJu 9651084bae
Add documentation for --chown support limitation (#3019) 2024-02-22 20:20:19 -05:00
Damien Degois 1bf529e6d9
Add flag to remap registries for any registry mirror (#2935)
* Add flag to remap registries for any registry mirror

The purpose of this PR is to add an option to remap registries, a kind of generalized `--registry-mirror`.
This is helpful for air-gapped environments and/or when local registry mirrors are available (not limited to docker.io).
This allows user to reference any images without having to change their location.
It also permit to separate infra related configuration (the mirrors) from CI/CD pipeline definition by using an environment variable for example (the reason behind the early return if flag provided but empty).
Therefore you can have a pipeline calling kaniko with `--registry-map=$REGISTRY_MAP` and have the `REGISTRY_MAP` populated via the runner's env by another team, and the absence of env wouldn't trigger a failure, it makes the pipeline env independent.

I've also considered the option of environment variables directly but it doesn't seems to be in kaniko's philosophy.

This makes quite some duplicated code :/ One option to keep the mirror flag and behavior would be to use only one codebase and convert `--registry-mirror=VALUE` to `--registry-map=index.docker.io=VALUE` internally. Suggestions welcome!

* Configure logging config sooner to be able to use it in flag parsing

* Replace registry mirrors by maps logic and use env var

* Add env vars to README.md

* Fix test
2024-02-14 15:23:41 -08:00
timbavtbc 0733ec1944
Clarify why merging into another container is a bad idea (#2965)
I tend to read 'YMMV' as 'might need some jiggling'. I think being explicit about the particular implementation details is more useful here.
2024-01-30 17:22:27 -05:00
Maximilian Hippler f7ac90e8ac
Fixed wrong example in README.md (#2931)
Fixed wrong gitlab-ci.yml example for "Merging the Container Manifests".
2024-01-09 10:10:09 -08:00
Anna Levenberg 6b7604ee58
feat: add a retry with result function enabled by --image-download-retry (#2853)
* feat: add a retry with result function enabled by --image-download-retry (#2853)

* impl: add a retry with result function

* fix ci errs

* test: add unit tests

* gofmt

* make debian a const

* update param description
2023-11-20 10:10:17 -08:00
Paolo Di Tommaso b1a0d57a65
Fix missing slash (#2658)
docs: fixes the missing slash in tar:// context example
2023-10-30 19:51:49 -07:00
zhangzhiqiangcs aac7360ffd
docs: fix readme sample typo (#2792)
Signed-off-by: zhangzhiqiang02 <zhangzhiqiang02@megvii.com>
2023-10-17 19:36:49 -07:00
Aaron Prindle d02945f98d
docs: fix --use-new-run typo (#2698) 2023-08-24 13:12:34 -07:00
Aaron Prindle 8a0af16472
docs: add more information regarding --use-new-run (#2687) 2023-08-18 11:36:06 -07:00
Julian cefe99b92a
Added skip-push-permission flag (#2657)
Added skip-push-permission flag to conditionally disable push permission check on build start to accommodate for slow network policies
2023-08-15 11:23:16 -07:00
Fernando Giannetti c2445c76da
Allows to disable the fallback to the default registry on image pull (#2637)
* Allow to disable the fallback to the default registry on image pull

When one or more registry mirror(s) are deffined with the 'registry-mirror' argument, if none of those mirrors include the image,
the current behavior is to fallback to the default registry.
If a whitelist (or some image restriction) is applied at the mirror side, fallbacking to the default registry makes that restriction useless.
This new argument allows to skip the fallback and abort the build if the mirror rejects an image.
If it is not set, is completelly transparent.

* fix typo on command help
2023-07-26 13:05:37 -07:00
alexezio 0743c19176
feat: cache dockerfile images through warmer (#2499)
* feat: cache dockerfile images through warmer

* Fix logical error in conditional statement

* Addressed review feedback

1. Updated help text for the --build-arg flag to indicate it should be used with the dockerfile flag.
2. Updated the documentation to include the optional --build-arg flag.
3. Added unit tests for `ParseDockerfile`, covering scenarios for missing Dockerfile, invalid Dockerfile, single stage Dockerfile, multi-stage Dockerfile and Args Dockerfile

---------

Co-authored-by: 连奔驰 <benchi.lian@thoughtworks.com>
2023-06-21 12:00:22 -07:00
Jasper Ben Orschulko cce5d313b3
Add guide on creating multi-arch manifests (#2306)
* Add guide on creating multi-arch manifests

While kaniko itself does not natively support building multi-arch
container manifests, it may be used in combination with tools such as
manifest-tool to create and merge seperate arch builds into a single
manifest.

Fixes https://github.com/GoogleContainerTools/kaniko/issues/1102
Fixes https://github.com/GoogleContainerTools/kaniko/issues/786

* Add missing toc entry
2023-06-07 10:26:54 -07:00
Gabriel Nützi e4622a594e
fix: Correct deprecated flags in `README.md` (#2335)
* fix: Correct deprecated flags in `README.md`

* Update README.md

---------

Co-authored-by: Aaron Prindle <aprindle@google.com>
2023-05-18 14:37:57 -07:00
Eric 7525828ef9
Add mTLS (client cert) registry authentication (#2180)
* Add mTLS (client cert) support

Add support for Mutual TLS (mTLS) client certificate authentication.
The expected format of the new --registry-client-cert flag is the same
as the existing --registry-certificate flag, which will allow
different client certificates for different registries:

--registry-client-cert my.registry.url=/path/to/cert.crt,/path/to/key.key

* tidy: Rename mTLS (Client Cert) flag to be in line with others

This flag didn't describe that it was for the client certs uses with
the registry. Although this should be reasonably obvious, I like the
consistency with the other registry flag.

* test: Added unit tests for mTLS (Client Cert) loading

* test: Add 2 more tests for comma split formatting

since the comma splitting is a new portion of code let's make sure
that that format works well too in other cases

* tidy: Fix formatting of flag help text

* tidy: Made invalid cert format error consistent

I was running the tests and saw the message:

Failed to load client certificate/key '/path/to/client/certificate.cert' for my.registry.name, format is my.registry.name=/path/to/cert,/path/to/key

I then realized that it'd be a lot nicer if this showed the user what
they input, and how they should change it (rather than decomposing it:

Failed to load client certificate/key 'my.registry.name=/path/to/client/certificate.cert', expected format: my.registry.name=/path/to/cert,/path/to/key

* test: Fixed incorrect test argument

This didn't fail the test before because it's only attempting to show
that certs only get loaded and used for their associated registry but
it's important to keep this correct.

This case is covered by the test below, "RegistriesClientCertificates
incorrect cert format"

* doc: Add new flag to README.md

* mod: Fail to push if there was a problem loading client certs

Rather than warning that there was an issue, we should fail if the
requested client certificates were not found or failed to load.

This feels a lot better than waiting for the build to finish then
failing later.

* mod: Return an error if the certificate authority fails to load, just like client certs

The MakeTransport function was changed in the previous commit to
allow returning errors if there was a problem loading certificates,
rather than just print warnings.

This feels a lot better as you get the error immediately that there's
a problem to fix, rather than getting a warning, then later an error
that the server's certificate could not be verified.

* tidy: fix golint issues
2023-05-18 14:20:51 -07:00
Jerry Jones cf9a334cb0
chore: fix typo (#2316) 2022-11-10 12:35:15 -05:00
Junwon Kwon 403e627321
chore: fix typo (#2289) 2022-10-23 12:51:51 -04:00
Bryan A. S ee513538f6
fix(README.md): remove duplicate caching section (#2223)
Remove duplicate paragraph at caching/caching layers section.
2022-08-25 10:51:14 -04:00
Gabriel Nützi 90e426ba3f
refactor: Make CLI argument names consistent (#2084)
* fix: Wrong argument naming

* fix: tarPath as well

* Test

* fix: Fix tests

* np: Format markdown

* fix: Review changes
2022-08-22 09:10:11 -04:00
Ramy f9dcb92c38
add cache run command option (#2032)
Co-authored-by: Rami CHAABANE <rchaabane@scaleway.com>
2022-08-09 08:35:00 -04:00
Ishant Mrinal Haloi 1c0e5a0aca
Update Azure credHelpers docs (#2109) 2022-05-27 11:29:59 -04:00
Yonatan Koren ce1fb51579
Fix README blurb on --cache-copy-layers, so that the purpose of the flag is more clear. (#2064)
Co-authored-by: Yonatan Koren <10080107+korenyoni@users.noreply.github.com>
2022-05-16 12:20:14 -07:00
Jasper Ben Orschulko b6d18cc150
README.md: Update docs on building for AWS ECR (#2020)
- Kaniko v.1.8.0 does not require additional cred helper logic for ECR,
as it discovers ECR repositories automatically and acts accordingly.
Thus removed from the documentation.
- Add details on using IAM role based authentication for pushing to ECR.

Fixes https://github.com/GoogleContainerTools/kaniko/issues/780
Fixes https://github.com/GoogleContainerTools/kaniko/issues/1455

Signed-off-by: Jasper Orschulko <Jasper.Orschulko@iris-sensing.com>
2022-03-28 09:49:38 -04:00
Wolfgang Walther 2bc27c63a1
Fix formatting for `--image-fs-extract-retry` (#1942) 2022-02-17 14:59:21 -08:00
Pat Litke 87bed1417f
Update readme (#1897)
Describes work-around for #1803 - add an example of how to work around issues encountered out of the box when trying to pass build-args that contain spaces in their values
2022-01-28 14:51:08 -05:00
jeunii 54395fc944
Fix typo (#1825) 2021-12-23 12:03:20 -05:00
Sebastiaan Tammer 2cb0387758
Fix broken anchor link (#1804) 2021-12-23 11:35:21 -05:00
Bernardo Marques 7ae8e7d740
Update readme insecure flags (#1811)
* Clarify usage of --skip-tls-verify-registry argument

Referring to --skip-tls-verify-registry as a "flag" is misleading since
command line flags usually require no value. Thus, the documentation
is updated to match the behavior of the command line argument.

* Clarify usage of --insecure-registry argument

Referring to --insecure-registry as a "flag" is misleading since
command line flags usually require no value. Thus, the documentation
is updated to match the behavior of the command line argument.
2021-12-23 11:32:39 -05:00
Dávid Szakállas 840923b798
add documentation on ACR cred helper (#1831) 2021-12-23 11:32:17 -05:00
Jason Hall 59c2d2d08f
Collapse integration test workflows into one config (#1855)
* Collapse integration test workflows into one config

Remove last traces of Travis, including env vars and `make travis-setup`
and badges in README

* fix lint

* make integration tests pass on PRs
2021-12-22 20:04:40 -05:00
Janosch Maier 46e01340c2
Remove tarball.WithCompressedCaching flag to resolve OOM Killed error (#1722)
* Remove tarball.WithCompressedCaching flag to resolve OOM Killed error

Large images cannot be build as the kaniko container will be killed due to an OOM error. Removing the tarball compression drastically reduces the memory required to push large image layers. Fixes #1680

This change may increase the build time for smaller images. Therefore a command line option to trigger the compression or a more intelligent behaviour may be useful.

* Add new command line flag to toggle compressed caching

* Add unittest for build with --compressed-caching command line flag set to false
2021-10-19 00:14:06 -07:00
Mikhail Vasin 544abd7665
Fix typo (#1719)
* Fix typo

* Another typo
2021-10-18 23:56:04 -07:00
Yahav Itzhak 211d487e44
Add instructions for using Artifactory (#1715) 2021-08-10 22:01:12 -07:00
Silvano Cirujano Cuesta 1d9bc175c2
Add support for CPU variants (#1676)
Signed-off-by: Silvano Cirujano Cuesta <silvano.cirujano-cuesta@siemens.com>
Inspired-by: mickkael 19755421+mickkael@users.noreply.github.com
2021-07-08 12:05:38 -07:00
ankitm123 9997cd4d40
docs: add missing cache-copy-layers arg in README (#1672)
Signed-off-by: ankitm123 <ankitmohapatra123@gmail.com>
2021-07-08 12:01:09 -07:00
Jose Donizetti 5b3fb84a22
Retry extracting filesystem from image (#1685)
* Retry extracting filesystem from image

* Add flag image-fs-extract-retry

* Add --image-fs-extract-retry documentation
2021-07-08 12:00:22 -07:00
Tejal Desai 04fb2fd55e
rename flag `--whitelist-var-run` to `ignore-var-run` (#1668)
* rename flag

* instead depcrecate

* add normalize function
2021-06-14 12:08:37 -07:00
Jon Friesen d40a51f38f
adds ignore-path command arguments to executor (#1622)
* adds ignore-path command

* add flag to README
2021-04-13 14:29:51 -07:00
priyawadhwa 298245c648
Check-in cosign public key and update README (#1611) 2021-03-31 09:14:07 -05:00
Tejal Desai ea96245f64
Add references to the bottom 2021-02-22 22:23:49 -08:00
Viktor Farcic 5e4fe2b9f2
docs: Added a video introduction to Kaniko (#1517)
* Video introduction

* Update README.md

Add new references section

Co-authored-by: Tejal Desai <tejal29@gmail.com>
2021-02-22 22:22:59 -08:00
Sascha Schwarze 69f942f751
Improve retry behavior for push operation (#1578)
* Update go-containerregistry to 0.4

* Implement --push-retry argument
2021-02-22 21:25:58 -08:00