Commit Graph

1684 Commits

Author SHA1 Message Date
Thao-Nguyen Do e7fd0d4db5
Update golang to 1.12 in debug image 2019-04-29 09:16:48 +02:00
Thao-Nguyen Do 0183405c11
Update base image for main image to golang:1.12 2019-04-29 09:16:13 +02:00
Akihiro Suda 404af20f7c README.md: update BuildKit/img comparison (#642)
Latest BuildKit/img no longer necessarily requires procMount to be unmasked, by
 not unsharing PID namespaces.

The current drawback of BuildKit/img compared to kaniko is that BuildKit/img
requires seccomp and AppArmor to be disabled so as to create nested containers.

https://github.com/moby/buildkit/pull/768
https://github.com/genuinetools/img/pull/221

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2019-04-25 10:41:38 -07:00
Balint Pato 7901c76127
Update README.md 2019-04-16 15:53:20 -07:00
Johan Hernandez 841cfb3f53 Add documentation for --verbosity flag (#634) 2019-04-15 13:32:44 -07:00
Dirk Gustke dd9d081447 this is quite spammy in my multistage build (#640)
.. and as i am surely not the only one, move it down to debug.
2019-04-15 13:22:46 -07:00
Kartik Verma fa2a2c803b
Updated PR Branch with master 2019-04-09 02:18:28 +05:30
Johannes 'fish' Ziemke 8f863213b8
Remove cruft 2019-04-01 11:13:10 +02:00
Fred Cox 82f4179ba6
Reduce log level for adding file message
This makes for massive logs and with it at debug level will be simpler to look at the output of kaniko
2019-03-25 22:14:47 +02:00
dlorenc c8fabdf6e4
Fix arg handling for multi-stage images in COPY instructions. (#621) 2019-03-22 12:24:43 -05:00
Daisuke Taniwaki 1bf4421047 Fix parent directory permissions (#619)
* Add parent directories of adding files

* Add integration Dockerfile to test parent directory permissions

* Remove unnecessary helper method

* Use a file on the internet for integration Dockerfile
2019-03-19 12:40:15 -05:00
Jason Hall 3fa411ceb9 Check push permissions before building images (#622)
* Check push permissions before building images

* Fix doc comment

* improve error messages
2019-03-19 12:39:59 -05:00
Daisuke Taniwaki 28bfb75a31 Fix file mode bug (#618)
* Fix file mode

* Add Dockerfile for special file permission test
2019-03-18 13:28:24 -05:00
Warren Seymour 319bfde932 Include warmer in debug image
When using Kaniko with certain build systems, such as GitLab CI, it is necessary to use the 'debug' image and override the entrypoint, so that an arbitrary build script can be executed within the container.  Unfortunately, the 'warmer' binary is not available in the 'debug' image, making it impossible to perform a base image cache warmup using such build systems.

This patch addresses this by ensuring that the 'out/warmer' target is made in the initial stage, and that all 'out' files are copied to '/kaniko' in the final stage.
2019-03-15 10:20:13 +00:00
dlorenc 246cc92a33
Optimize file copying and stage saving between stages. (#605)
This change calculates the exact files and directories needed between
stages used in the COPY command. Instead of saving the entire
stage as a tarball, we now save only the necessary files.
2019-03-13 07:47:28 -07:00
Vincent Demeester 6ce3dfb93a Bump go-containerregistry to 8c1640add99804503b4126abc718931a4d93c31a (#609)
The main reason is to include the fixes from
https://github.com/google/go-containerregistry/pull/401. This should
fix the build+push to quay.io (with v2 schema enabled) cases.

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
2019-03-11 13:44:32 -07:00
Jason Hall a916b72169
Add license header 2019-03-07 10:33:23 -05:00
dlorenc 9912ccbf8d
Fix USER handling. There were two issues: (#600)
- We were validating usernames/groupnames existed in etc/passwd. Docker does not do this
- We were incorrectly caching USER commands. This was fixed automatically by fixing the first part.
2019-03-07 07:05:24 -08:00
Jason Hall 295dd49487 Write data about pushed images if env var is set 2019-03-06 14:37:56 -05:00
priyawadhwa 969321521e Update go-containerregistry (#599)
* Update go-containerregistry

Update go-containerregistry since it can now handle image names of the
format repo:tag@digest.

Should fix #535.

Thanks @ViceIce for the fix!

* update go-containerregistry again
2019-03-06 10:39:51 -08:00
priyawadhwa cc5a4d2e45
Merge pull request #593 from AnthonyWeston/skip-tls-verify-pull-documentation
Added missing documentation for --skip-tls-verify-pull arg
2019-03-05 10:39:42 -08:00
Anthony Weston 6b1ac2ac96
Fixed spelling error 2019-03-04 18:14:35 -05:00
Anthony Weston f6f26dfe80
Added missing documentation for --skip-tls-verify-pull arg 2019-03-03 10:38:42 -05:00
dlorenc 2abe109eb2
Environment variables should be replaced in URLs in ADD commands. (#580)
We were previously explicitly skipping this for some reason, but Docker
seems to expand these in URLs so we should too.
2019-02-25 10:42:34 -06:00
Valentin Rothberg 1d079e683e README.me: update Buildah description (#586)
Use the latest description of Buildah from upstream.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-02-25 09:52:53 -06:00
Priya Wadhwa 8b459b57aa Test git buildcontext 2019-02-21 13:03:02 -08:00
dlorenc 4b7e2b3a06
Update the cache warmer to also save manifests. (#576) 2019-02-21 14:09:22 -06:00
Priya Wadhwa 3da2fdf2d0 Merge branch 'issue#269' of https://github.com/vkartik97/kaniko into vkartik97-issue#269 2019-02-21 11:55:51 -08:00
Valentin Rothberg 94d7db884b README.md: update Buildah description (#573)
The description of Buildah is a bit outdated, most importantly Buildah
does not require root privileges (anymore).  Also provide a more
detailed description copied from github.com/containers/buildah.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-02-21 11:11:28 -06:00
dlorenc 378a3f9573
Look for manifests in the local cache next to the full images. (#570)
Calculating a manifest from a v1.tarball is very expensive. We can
store those locally as well, and use them if they exist.

This should eventually be replaced with oci layout support once that exists
in ggcr.
2019-02-19 13:54:41 -06:00
Jason Hall faadb2af86 Log "Skipping paths under..." to debug (#571)
This reduces noise in the log output, since it isn't terribly useful to most end users.
2019-02-19 13:54:26 -06:00
priyawadhwa f197a06ee9
Merge pull request #569 from frelon/master
Fix typo in error message
2019-02-19 11:43:11 -08:00
dlorenc 7c3947b08d
Make the run_in_docker script support caching. (#564) 2019-02-19 09:48:29 -06:00
Fredrik Lönnegren 1b54bda32e Fix typo 2019-02-19 16:43:20 +01:00
Shuhei Kitagawa e8564f0d28 Add missing tests for bucket util (#565)
* Add CheckDeepEqual test util

* Fix for srcContext with slash suffix

* Add tests for bucket_util.go
2019-02-19 09:05:23 -06:00
dlorenc 4feed0ff35
Stop storing a separate cache hash. (#560)
This is unrequired, mtimes should be taken into account during caching.
2019-02-14 12:24:43 -06:00
dlorenc 8d78db4842
Refactor snapshotting (#561) 2019-02-14 12:14:28 -06:00
dlorenc 15e70d4142
Speed up workdir by always returning an empty filelist (rather than a nil one). (#557)
Nil indicates that a full snapshot is required. Empty indicates that nothing should be snapshotted.
2019-02-13 11:55:08 -06:00
dlorenc 877abd30ed
Refactor whitelist handling. (#559)
Also speed up stage deletion.
2019-02-13 11:17:56 -06:00
dlorenc 8179c47f0d
Refactor the build loop to fetch stagebuilders earlier. (#558)
This will help with optimizations.
2019-02-12 20:43:22 -06:00
dlorenc 114a0859b8
Cut 0.9.0 release. (#556) 2019-02-08 16:42:33 -06:00
James Rawlings af50bcec69 let's return errors when warming a cache (#553)
* let's return errors when warming a cache

* Fix lint error in warm.go
2019-02-08 15:14:53 -06:00
dlorenc 9047ccf7cc
This fixes a bug in the interaction between volumes in base images (#555)
and our snapshot optimizations.

If a previous base image has a volume, the directory is added to the
list of files to snapshot. That directory may not actually exist in the image.
2019-02-08 14:40:37 -06:00
dlorenc e14b660947
Fix a bug in volume handling for multi-stage images. (#554)
We were previously not resetting the whitelist between stages, this caused issues with volumes.
2019-02-07 09:01:49 -06:00
Anurag Goel 82fe355f14 Fix issues with layer caching, noPush and tarPath (#549)
* Set TarPath to empty when pushing a layer

* Fix issues with layer caching, noPush and tarPath.

- Layer caching should work even when tarPath is specified, so this
commit changes the value of tarPath to empty when caching layers.

- When an image is built with just the tarPath and noPush
is true, we should still create the tarBall (which wasn't happening
before this commit).

* Set no-push to false for cache layers

* Remove extra log

* go-imports fix
2019-02-06 10:16:09 -06:00
dlorenc 9f65174cb8
Generate the config.json from gcloud rather than relying on a hardcoded one. (#551)
marketplace.gcr.io now requires auth, but our credential helper doesn't know that.
2019-02-04 16:53:59 -06:00
Kartik Verma f413dfd414
Ensuring Dep 2019-02-02 11:33:27 +05:30
Kartik Verma 0b3f40547f
Correcting Gopkg.lock 2019-02-02 11:31:57 +05:30
Kartik Verma 2f8bdd99b7
Resolved Merge Conflicts 2019-02-02 11:28:40 +05:30
Kartik Verma 785691ecc2
Made changes as per review 2019-02-02 11:18:54 +05:30