Commit Graph

822 Commits

Author SHA1 Message Date
Sascha Schwarze 0ef53aa1d3
Optimize access to image manifests (#1555)
Introduce an in-memory cache for retrieved manifests in remote.go
2021-01-28 11:10:13 -08:00
Theofilos Papapanagiotou 24fd3b2ab0
Fetch a github pull request (#1543) 2021-01-22 11:43:39 -08:00
Or Geva b3e036aab2
Add --image-name-tag-with-digest flag (#1541) 2021-01-19 13:28:05 -08:00
Josh Chorlton ece215c181
reject tarball writes with no destinations (#1534)
* reject tarball writes with no destinations

* Update pkg/snapshot/snapshot.go

Co-authored-by: Tejal Desai <tejal29@gmail.com>
2021-01-03 10:13:05 -08:00
Tejal Desai 86e361c20e
Update fs_util.go 2020-12-22 00:16:54 -08:00
Tejal Desai 9f76932171
Update GowalkDir dependency to pick up fixes. Added default 90 min timeout for walking FS. Override it with environment variable. Add slowjam to kaniko pod (#1530) 2020-12-21 22:40:37 -08:00
Matt Moore 1ad4295462
Update ggcr to pick up estargz and caching option (#1527) 2020-12-21 10:09:21 -08:00
Tejal Desai b04399eeac
add caching copy layers back (#1518)
* add caching copy layers back

* fix test

* lint

* fix test - 2

* Add integration test

* fix lint
2020-12-11 00:25:03 -08:00
Vincent Behar dde98a8e73
feat(warmer): Warmer now supports all registry-related flags (#1499)
which means we can now:
- set up one or more mirrors
- set up registries certificates
- skip TLS verify
- use plain HTTP
using the same set of flags that are defined for the executor
2020-12-10 22:55:43 -08:00
Fabrice 454910f613
feat: Add https tar.gz remote source for context (#1519)
* feat: Add https tar.gz remote source for context

* Add license header

* add license header

Co-authored-by: Tejal Desai <tejal29@gmail.com>
2020-12-10 22:55:02 -08:00
Severin Strobl c2a919a801
Switch to runtime detection via bpfd/proc (#1502)
The upstream of github.com/genuinetools/amicontained switched to the
container runtime detection via github.com/genuinetools/bpfd/proc,
which supports a larger range of container runtimes. With this change
(among others) Podman can be detected correctly.

Fixes #1501.
2020-12-09 11:44:31 -08:00
Lars c982956c15
Fix typo in error message (#1494) 2020-12-08 16:18:11 -08:00
Vincent Behar 131828a1ad
feat: support multiple registry mirrors with fallback (#1498)
Fixes #1473

The initial implementation of the registry mirror only allowed a single mirror, and if pulling from the mirror failed, the build would fail.

This change introduces:
- multiple registry mirrors instead of a single one
- fallback if an image can't be pulled from a registry

This is the same behavior as the docker daemon and will allow using a registry mirror such as `mirror.gcr.io` which is incomplete and doesn't have all the content that the default registry on docker.io has.

Note that there are no changes in the CLI flags, the `--registry-mirror` flag is still valid. But now it can be used multiple times to set up more than one registry mirror.

Co-authored-by: Tejal Desai <tejaldesai@google.com>
2020-12-08 16:16:25 -08:00
Sladyn 0c1a1a690a
Fix COPY with --chown command (#1477)
* Fix COPY with --chown command

* fix linters
2020-12-08 16:12:04 -08:00
Lars bdcdec7c93
Remove unused code (#1495) 2020-12-08 16:11:42 -08:00
mickkael 275cc9a7e7
Add option customPlatform (#1500)
* Add option customPlatform

* fix formatting

* fix No newline at end of file
2020-12-08 16:11:18 -08:00
Shashank 9ed158c1f6
Fixes #1469 : Remove file that matches with the directory path (#1478)
* Fixes #1469 : Remove file that matches with the directory path

* Fixes #1469 : Remove file that matches with the directory path

* Fixes #1469 : Fix lint errors

* Fixes #1469 : Fix lint errors

* Fixes #1469 : Fix lint errors

* Fixes #1469 : Reduce conditional depth

* Fixes #1469 : Remove an additional line

Co-authored-by: anugu-chegg <anugu.s@chegg.com>
2020-11-05 08:48:55 -08:00
ejose19 2f8d939b3f
fix: CheckPushPermissions not being called when CacheRepo was set (#1471) 2020-10-29 23:46:00 -07:00
Tinjo Schöni 5f4e2f1366
Fix .dockerignore for build context copies in later stages (#1447)
* Extend .dockerignore integration test with copies in later stages

.dockerignore should continue to apply when copying from the build context in later stages, but it currently doesn't

* Replace excluded global with passed along FileContext struct

This new FileContext struct allows much cleaner handling of context specific file exclusions.
The global excluded file state is no longer needed.

Additionally this also fixes the issue where excluded files aren't being applied for build context copies in later build stages.
2020-10-08 12:47:14 -07:00
ejose19 0ef3a6b525
Fix permissions on cache when --no-push is set (#1445) 2020-10-02 10:11:12 -07:00
Ian Kerins 1240333657
Stop caching COPY layers (#1408)
Cached COPY layers are expensive in that they both need to be retrieved
over the network and occupy space in the layer cache.

They are unnecessary in that we already have all resources needed to
execute the COPY locally, and doing so is a trivial file-system
operation.  This is in contrast to RUN layers, which can do
arbitrary and unbounded work.

The end result is that cached COPY commands were more expensive when
cached, not less.  Remove them.

Resolves #1357
2020-09-30 17:18:50 -07:00
Tejal Desai 357286fa4b
add tests (#1426) 2020-09-30 16:46:22 -07:00
Akram Ben Aissi ab768b5d26
Allow DOCKER_CONFIG to be a filename (#1409)
* Allow DOCKER_CONFIG to be a filename

* UnitTest: DockerConfLocation must return a file if it is existent and passed using env, or default if the file is incorrect
2020-09-30 16:45:34 -07:00
Tejal Desai 0c386e3f4a
fix docker-credential-gcr helper being called for multiple registries (#1439)
* fix multiple registryies docker-credential-gcr

* Update pkg/executor/push.go
2020-09-30 16:43:16 -07:00
Tejal Desai 1990cb76e9 change repo string to just string 2020-09-09 09:09:19 -07:00
Joe Kutner 0a0b4f1583
Add func to append to ignorelist.
This allows those using Kaniko as a library to add ignored dirs and
files without needs to modify /proc/self/mountinfo or doing other
strange things with mount -t tmpfs
2020-08-26 08:30:42 -05:00
Tejal Desai 0c7e1644cb
Merge pull request #1322 from caarlos0/opts
feat: new git flags
2020-08-13 15:08:36 -07:00
Tejal Desai df7f4cc9dc add boilerplate 2020-08-13 14:44:07 -07:00
Tejal Desai bfd92b5c6b
Merge pull request #1342 from aca/fix
Set correct PATH for exec form
2020-08-13 14:20:04 -07:00
Tejal Desai 94b2b6b391 gofmt 2020-08-13 14:03:38 -07:00
Tejal Desai abcc16b4cc fix gofmt 2020-08-13 13:59:58 -07:00
Tejal Desai 11024f258d new implementation for run 2020-08-13 13:43:07 -07:00
Tejal Desai 472376307e
Update run.go 2020-08-13 13:17:42 -07:00
Tejal Desai 8f1528764f
add defer. 2020-08-13 10:47:35 -07:00
Tejal Desai 1f456866eb
Merge branch 'master' into opts 2020-08-13 10:43:14 -07:00
Tejal Desai 1bf66ef435
Merge pull request #1153 from why-xn/master
Checkout a specific git commit
2020-08-13 10:41:26 -07:00
Tejal Desai d83338e372
Merge pull request #1318 from caarlos0/git
feat: accept GIT_TOKEN
2020-08-13 10:40:07 -07:00
Tejal Desai 28a38ea4c2
Merge pull request #1374 from tsufeki/current-platform-in-warmer
Use current platform when fetching image in warmer
2020-08-13 10:36:58 -07:00
Tejal Desai 4ec9f206c8
Merge pull request #1379 from tejal29/fix_use_new_run
fix use new run marker
2020-08-13 09:46:20 -07:00
Tejal Desai 9a12c6f88e gofmt 2020-08-12 18:54:53 -07:00
Tejal Desai a8bef58fa5
Merge branch 'master' into opts 2020-08-12 16:55:51 -07:00
Tejal Desai 553933514a fix use new run marker 2020-08-12 16:06:19 -07:00
tsufeki 4af795bf4a Use current platform when fetching image in warmer
Cache warming fetched images without specifying platform, which resulted
in always pulling default linux/amd64. Even when kaniko was built and
run on arm64.

This change brings warmer's behaviour in line with executor's by
specifying runtime.GOOS/GOARCH.

Fixes #1372
2020-08-07 15:52:15 +02:00
Carlos Alexandro Becker 008f8e890c fix: lint issues
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-07-29 23:32:40 -03:00
Carlos Alexandro Becker fdcc40683e fix: lint issues
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-07-29 23:26:08 -03:00
Carlos Alexandro Becker ed04106af4 Merge remote-tracking branch 'upstream/master' into git 2020-07-29 23:24:17 -03:00
Tejal Desai a47a78edae
Merge pull request #1319 from caarlos0/go-git
feat: upgrade go-git
2020-07-28 21:32:16 -07:00
Tejal Desai 92917bab3a
Merge pull request #1326 from greut/add-to-err-on-404
add should fail on 40x
2020-07-28 21:30:29 -07:00
Tejal Desai 2427b348ac
Merge pull request #1350 from hlubek/bugfix-reproducible-whiteout
Bugfix: Reproducible layers with whiteout
2020-07-28 14:57:28 -07:00
Tejal Desai 46f270bbd4
Merge pull request #1264 from greut/fix/1172
pkg: prepend library when using registry mirror
2020-07-28 14:55:36 -07:00