Commit Graph

2266 Commits

Author SHA1 Message Date
dlorenc 58b607b4d0
Fix caching for multi-step builds. (#441)
This change fixes that by properly "replaying" the Dockerfile and mutating the config when
calculating cache keys. Previously we were looking at the wrong cache key for each command
when there was more than one.
2018-11-09 12:28:18 -06:00
priyawadhwa d97790119a
Merge pull request #436 from priyawadhwa/release
Update CHANGELOG and Makefile for v0.6.0
2018-11-06 17:40:38 -08:00
Priya Wadhwa 80bbb56255 Update changelog and makefile for v0.6.0 2018-11-06 15:44:02 -08:00
Sharif Elgamal 224b7e2b41
parse arg commands at the top of dockerfiles (#404)
* parse arg commands at the top of dockerfiles

* fix pointer reference bug and remove debugging

* fixing tests

* account for meta args with no value

* don't take fs snapshot if / is the only changed path

* move metaArgs inside KanikoStage

* removing unused property

* check for any directory instead of just /

* remove unnecessary check
2018-11-06 15:27:09 -08:00
Carlos Sanchez 5ed45ed2fb Preserve options when doing a cache push (#423)
* Preserve options when doing a cache push

Otherwise options like `insecure` are lost

* Do not override original object
2018-11-06 15:44:44 -06:00
dlorenc fc43e218f0
Buffer layers to disk as they are created. (#428)
When building Docker images, layers were previously stored in memory.
This caused obvious issues when manipulating large layers, which could
cause Kaniko to crash.
2018-11-06 09:26:54 -06:00
Kartik Verma fdac2fa94c
Resolved merge in README 2018-11-02 19:46:48 +05:30
Kartik Verma b9c678e6f8
Seperate Tests for bucketContextTests and gitRepoTests 2018-11-02 19:35:02 +05:30
dlorenc 52a6ce6685
More cache cleanups: (#397)
- move the layer cache to an interface
- refactor the DockerCommand implementations to support Cached and non-cached implementations.
2018-11-01 09:11:21 -07:00
priyawadhwa 7afb11cdf7
Merge pull request #424 from priyawadhwa/dockerignore
Fix bugs with .dockerignore and improve integration test
2018-10-31 14:16:17 -07:00
Sharif Elgamal 3c100508b6
adding documentation for base image caching (#421)
* adding documentation for base image caching

* add --cache-repo to list of params
2018-10-31 13:33:24 -07:00
Priya Wadhwa 55e6157000 Fix bugs with .dockerignore and improve integration test
I improved handling of the .dockerignore file by:

1. Using docker's parser to parse the .dockerignore and using their
helper functions to determine if a file should be deleted
2. Copying the Dockerfile we are building to /kaniko/Dockerfile so that
if the Dockerfile is specified in .dockerignore it won't be deleted, and
if it is specified in the .dockerignore it won't end up in the final
image
3. I also improved the integration test to create a temp directory with
files to ignore, and updated the .dockerignore to include exclusions (!)
2018-10-31 12:50:23 -07:00
priyawadhwa 6ef616b8b2
Merge pull request #394 from priyawadhwa/ignore
Add support for .dockerignore file
2018-10-30 16:49:04 -07:00
Priya Wadhwa ff4e624c6b don't delete .dockerignore 2018-10-30 16:06:46 -07:00
Priya Wadhwa cb0a5e0a18 Fix integration tests 2018-10-30 15:59:50 -07:00
priyawadhwa e0a24ee88a
Merge pull request #420 from priyawadhwa/vend
Update go-containerregistry
2018-10-30 10:39:28 -07:00
priyawadhwa 8e20cc6f43
Merge pull request #419 from priyawadhwa/readme
Update README
2018-10-29 14:04:57 -07:00
Priya Wadhwa 9a1a2ef9e3 Update go-containerregistry
Update go-containerregistry to merge in this
[PR](https://github.com/google/go-containerregistry/pull/293) and fix
2018-10-29 13:44:11 -07:00
Sharif Elgamal ede93786a1
fix releasing the cache warmer (#418) 2018-10-29 12:02:40 -07:00
Priya Wadhwa bf9f13b045 Update README
Updated README to clarify:

1. What a build context is and how kaniko interacts with it
2. How to set up a Kubernetes secret for auth to push the final image

Also made some general fixes to make the docs and the run_in_docker
script more clearer.
2018-10-29 11:45:06 -07:00
priyawadhwa 632bedf75c
Merge pull request #413 from priyawadhwa/auth
Use remoteImage function when getting digest for cache
2018-10-29 10:39:58 -07:00
priyawadhwa 458152910a
Merge pull request #409 from dtaniwaki/insecure-pull
Separate Insecure Pull Options
2018-10-26 15:00:27 -07:00
priyawadhwa 1996bf810a
Merge pull request #415 from j0shua/master
adding exit 1 when there are not enough command line vars passed to `…
2018-10-26 14:23:53 -07:00
priyawadhwa 5d731d3430
Merge pull request #414 from GoogleContainerTools/ImJasonH-patch-1
"Container Builder" - > "Cloud Build"
2018-10-26 14:13:17 -07:00
j0shua f1dfc2c685 adding exit 1 when there are not enough command line vars passed to `run in docker` script 2018-10-26 16:47:50 -04:00
Jason Hall b8c1314b39
"Container Builder" - > "Cloud Build" 2018-10-26 16:44:18 -04:00
Priya Wadhwa 9908eeb30a Use remoteImage function when getting digest for cache
Issue #410 experienced an error with base image caching where they were
"Not Authorized" to get information for a remote image, but later were
able to download and extract the base image.

To fix this, we can switch to using the remoteImage function for getting
information about the digest, which is the same function used for
downloading base images. This way we can also take advantage of the
--insecure and --skip-tls-verify flags if users pass those in when
trying to get digests for the cache as well.
2018-10-26 11:38:32 -07:00
Daisuke Taniwaki e8aab7e17e
Update README 2018-10-26 12:20:54 +09:00
Sharif Elgamal 1639d1d71c
adding the cache warmer to the release process (#412) 2018-10-25 16:42:34 -07:00
Daisuke Taniwaki e04a922dc3
Separate insecure pull options 2018-10-25 06:33:58 +09:00
Daisuke Taniwaki 05e3250043 Support insecure pull (#401) 2018-10-22 14:33:41 -07:00
Priya Wadhwa 3fc43f4c73 Add support for .dockerignore file 2018-10-19 09:58:50 -07:00
priyawadhwa 5108ee3ee1
Merge pull request #403 from peter-evans/invalid-root-home
Invalid HOME for root user fix
2018-10-18 10:25:39 -07:00
priyawadhwa f4612404c4
Merge pull request #389 from peter-evans/fix-symlink-extraction
Fix symlink extraction
2018-10-18 10:21:23 -07:00
peter-evans 39d6dc1ce7 Modify integration test for setting root user explicitly 2018-10-18 18:08:34 +09:00
peter-evans 49b2fa5199 Set root user to default home 2018-10-18 17:59:07 +09:00
peter-evans d4b54cbbca Add test for setting root user explicitly 2018-10-18 17:46:43 +09:00
priyawadhwa 37ec600916
Merge pull request #399 from priyawadhwa/release
Release v0.5.0
2018-10-16 11:57:15 -07:00
Priya Wadhwa 579b866abf Release v0.5.0 2018-10-16 10:04:18 -07:00
container-tools-bot 9b18cd1b77
Merge pull request #396 from chemidy/lint
fix mispell
2018-10-15 14:14:21 -07:00
dlorenc 5ac29a9773
Use only the necessary files in the cache keys. (#387) 2018-10-15 08:56:34 -05:00
Cyrille Hemidy 38c8c89b6a fix mispell 2018-10-14 00:38:18 +02:00
peter-evans d8beff6f28 Update test for link and file extraction to non-empty dir 2018-10-13 08:04:27 +09:00
Priya Wadhwa adac8d495d Add test dir for ignore files
It seems like .dockerignore deletes files containeed within the file locally upon
docker build, so I created a temporary test dir to make sure the
--ignore flag works. We make sure it exists before building docker and
kaniko for Dockerfile_test_ignore, and then delete it after the builds
have completed.
2018-10-12 12:48:16 -07:00
Priya Wadhwa a572774bbe Add --ignore flag
Added a --ignore flag to ignore packages and files in the build context.
This should mimic the .dockerignore file. Before starting the build, we
go through and delete ignored files from the build context.
2018-10-12 12:09:59 -07:00
priyawadhwa 72e088fda5
Merge pull request #393 from dzoeteman/patch-1
Change loglevel for copying files to debug (#303)
2018-10-12 10:54:36 -07:00
Deniz Zoeteman 129eb9b8a8
Change loglevel for copying files to debug (#303) 2018-10-12 16:16:48 +02:00
priyawadhwa aabb97b944
Merge pull request #390 from Zetten/enhance-is-dest-dir
Improve IsDestDir functionality with filesystem info
2018-10-11 18:15:59 -07:00
Sharif Elgamal effac9dfc3
Persistent volume caching for base images (#383)
* comments

* initial commit for persisent volume caching

* cache warmer works

* general cleanup

* adding some debugging

* adding missing files

* Fixing up cache retrieval and cleanup

* fix tests

* removing auth since we only cache public images

* simplifying the caching logic

* fixing logic

* adding volume cache to integration tests. remove auth from cache warmer image.

* add building warmer to integration-test

* move sample yaml files to examples dir

* small test fix
2018-10-11 13:38:05 -07:00
Peter van Zetten 073abff176 Improve IsDestDir functionality with filesystem info
Add a check for FileInfo to determine whether a given string is a
directory path. If any error occurs, fall back to the naive string
check.

Fixes #365
2018-10-11 11:11:12 +01:00