Commit Graph

594 Commits

Author SHA1 Message Date
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
peter-evans 38e8dc2cdd Remove all at path to make way for new reg files and links 2018-10-11 15:33:25 +09:00
peter-evans 796b2515a7 Add test for symlink extraction to non-empty dir 2018-10-11 11:18:26 +09:00
peter-evans 5695ebc3d5 Remove all at path to make way for new symlink 2018-10-11 09:28:55 +09:00
priyawadhwa 03db09e95f
Merge pull request #388 from ianberinger/master
Update go-containerregistry dependency
2018-10-10 12:17:58 -07:00
Ian Beringer a72970712f
Update go-containerregistry dependency #245 2018-10-10 20:44:19 +02:00
dlorenc 9a0e29c441
Refactor the build loop. (#385)
This change refactors the build loop a bit to make cache optimization easier in the future. Some notable changes:

The special casing around volume snapshots is removed. Every volume is added to the snapshotFiles list for every command that will snapshot anyway.
Snapshot saving was extracted to a sub-function
The decision on whether or not to snapshot was extracted
2018-10-09 12:15:17 -05:00
priyawadhwa 0a13e042c2
Merge pull request #382 from orisano/patch-1
chore: fix broken markdown (CHANGELOG.md)
2018-10-03 15:00:39 -07:00
dlorenc 734ffe65ce
Rework cache key generation a bit. (#375)
* Rework cache key generation a bit.

Cache keys are now based on the previous commands, rather than the previous state
of the filesystem.

* Refactor command interface a bit, only cache the context for commands that use it.
2018-10-03 16:16:12 -05:00
Nao YONASHIRO 4155330f33
chore: fix broken markdown 2018-10-04 05:51:57 +09:00