Commit Graph

226 Commits

Author SHA1 Message Date
Tejal Desai a173bf020b
Merge pull request #1115 from JordanGoasdoue/allow-build-context-from-local-targz
feat: add support of local '.tar.gz' file inside the kaniko container
2020-03-17 15:24:10 -07:00
Sam Stoelinga bb76d8c3cc Update README on running in Docker
Make the running in Docker section more clear by showing the actual
docker run command instead of only the utility.
2020-03-17 00:09:41 -07:00
Jordan GOASDOUE fda7ed4f74 feat: add support of local '.tar.gz' file inside the kaniko container 2020-03-12 22:51:30 +01:00
Yoan Blanc 53326fa0bf
executor: add --label flag
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
2020-03-07 18:17:26 +01:00
Batuhan Apaydın 30920d537e fixing docker run command in README.md
Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
2020-03-04 16:37:01 +03:00
Tejal Desai 8d2b205ef2
Merge pull request #1060 from DracoBlue/patch-1
Fixed typo in README.md
2020-02-28 11:01:16 -08:00
DracoBlue 2a71eaeda5
Fixed typo in README.md 2020-02-16 20:29:01 +01:00
Yoan Blanc edc4eb33f4
Merge remote-tracking branch 'origin/master' into registry-mirror 2020-02-16 09:28:54 +01:00
Thomas Strömberg dfd3030c69
Document that Kaniko is not officially supported
This is in-line with what I will be doing with our other GoogleContainerTools projects. Thoughts?
2020-02-10 16:50:34 -08:00
Tejal Desai 47ab3fe997
Merge branch 'master' into registry-mirror 2020-01-29 11:42:06 -08:00
Tejal Desai 8b991f6baf Add falg to --whitelist-var-run set to true to preserver default kaniko behaviour of /var/run ignored. Set it to false to add /var/run in destination directory 2020-01-28 10:52:36 -08:00
Tejal Desai c8b19894bb Revert "additional-whitelist"
This reverts commit ac8e123815.
2020-01-28 08:52:29 -08:00
cvgw ac8e123815 additional-whitelist
* update readme
* improve test
* change default
2020-01-24 10:22:20 -08:00
Yoan Blanc 140879fadd
Merge remote-tracking branch 'origin/master' into registry-mirror 2020-01-18 09:35:56 +01:00
Cole Wippern 732b270035
Merge pull request #930 from carlossg/ecr
Push to ECR using instance roles
2019-12-22 10:56:09 -08:00
Yoan Blanc 3678b70239
Merge remote-tracking branch 'origin/master' into registry-mirror 2019-12-22 11:10:15 +01:00
Josh Soref 22bcd28931 Grammar (#911)
* spelling: environment

* spelling: into

* spelling: certificate

* grammar: based on

* spelling: its

* spelling: non-root

* grammar: unnecessary comma in a compound predicate

* grammar: comma after introductory phrase

* grammar: pronoun problem

(per app.grammarly.com)
2019-12-21 12:54:23 -08:00
Cole Wippern 005860818f
Merge pull request #867 from dastrobu/fix-toc-in-readme
Update outdated toc in README.md
2019-12-21 12:52:50 -08:00
Carlos Sanchez 16aff6a974 Using credsStore is simpler
and we don't need to push to multiple registries likely
2019-12-21 13:06:47 +01:00
Carlos Sanchez 6b85605285 Push to ECR using instance roles
Add instructions

Fixes #785
2019-12-21 12:54:18 +01:00
Tejal Desai fbdb8f39c8
Merge branch 'master' into registry-mirror 2019-12-09 15:40:56 -08:00
Tejal Desai 632651581e
Merge pull request #906 from Pweetoo/master
updated readme
2019-12-09 15:39:14 -08:00
Tejal Desai c54d1a5e72
Merge branch 'master' into fix-toc-in-readme 2019-12-09 12:56:50 -08:00
Tejal Desai 05da029663
Merge pull request #872 from edbighead/fix/readme-anchors
Fix README.md anchor links
2019-12-09 12:54:52 -08:00
Tejal Desai 6e4811ad9f
Merge pull request #876 from totomz/not-valid-link-ecr-readme
Invalid link to missing file config.json
2019-12-09 12:53:53 -08:00
Tejal Desai a7bbe171fb
Merge pull request #861 from GoogleContainerTools/balopat-patch-1
nits in README
2019-12-09 12:51:59 -08:00
Pweetoo 32e321af78
updated readme
Added argument -n for echo command.
2019-12-09 09:15:26 +01:00
Yoan Blanc 980c87ac17
Merge remote-tracking branch 'origin/master' into registry-mirror 2019-12-05 19:12:47 +01:00
Eduard Laur c2a8b33f9c Fix README.md anchor links 2019-11-26 12:54:55 +02:00
tommaso.doninelli c49b4747bd Invalid link to missing file config.json
Link points to the AWS ECR Credentials Helper config that explain how to
configure it
2019-11-22 07:12:31 +01:00
Cole Wippern 02db3c18fa Update readme
* Know Issues
  * kaniko in non-official images
  * v1 Registry Schema
2019-11-21 12:58:19 -08:00
Daniel Strobusch 0c1949ba1d
Update outdated toc in README.md
Links to command line arguments where all broken on github, since preceding dashes where missing from the links. This commit contains an autogenerated doc after running: doctoc --github README.md (version 1.4.0)
2019-11-17 13:05:21 +01:00
Tejal Desai 4f789a0dfe
Add survey link to Readme. 2019-11-15 12:04:11 -08:00
Balint Pato 8eb05761ad
nits 2019-11-15 09:50:44 -08:00
Tejal Desai 907ae256a4
update Readme.md 2019-11-11 10:38:18 -08:00
Tejal Desai a122fc6360
Add Slack channel url 2019-11-11 10:35:02 -08:00
Yoan Blanc 6e2287c969
readme: add --registry-mirror
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
2019-11-10 12:55:31 +01:00
priyawadhwa d4badf36d6
Merge pull request #829 from codevbus/fix-run-in-docker-doc-828
828: clean up docker doc, fix context var in run cmd
2019-10-28 12:56:35 -07:00
Mike Vanbuskirk 8f7eb00433 828: revert context to workspace, clean up doc 2019-10-22 17:39:37 -04:00
yangtaokm 616eb83d92 Refactory and Code and Merge remote-tracking branch 'upstream/master' into azure-blobstorage-https 2019-10-22 16:43:11 +08:00
Mike Vanbuskirk d970fa8af3 828: clean up docker doc, fix context var in run cmd 2019-10-21 22:45:54 -04:00
yangtaokm 3e6a24b152 Initial commit for Azure Blob Storage SupportX 2019-10-13 20:52:19 +08:00
Petr Ruzicka c1bf362400 Details about --tarPath usage improved 2019-10-09 11:29:49 +02:00
Tejal Desai de093f9e05
Merge pull request #129 from carlossg/credentials-pass
Use kaniko with docker config.json password
2019-10-04 08:44:28 -07:00
Tejal Desai 14ed530234
fix the /root to /kaniko 2019-10-04 01:32:38 -07:00
debuggy 7771d1b448 Add getting started tutorial 2019-09-26 17:13:39 +08:00
Herrmann Hinz 0bd5eb51f7
double help text about skip-verify-tls
removed
2019-09-18 12:33:04 +02:00
Tejal Desai 9574d4f2a9
Merge pull request #493 from nielsdenissen/patch-1
Add desc for `--skip-tls-verify-pull` to README
2019-09-13 14:22:23 -07:00
chhsia0 11f3b791cd Renamed to `--oci-layout-path` and added a unit test. 2019-08-24 01:28:58 -07:00
chhsia0 7949d0de1d Added a README for the flag. 2019-08-24 01:04:18 -07:00
Carlos Sanchez 9454b5d28b Document how to build from git reference 2019-07-31 17:25:02 +02:00
Kartik Verma f137f81884
Resolved Merge Conflicts
Signed-off-by: Kartik Verma <vkartik97@gmail.com>
2019-05-21 01:52:14 +05:30
Gijs 1c13829cda Update README to reflect flag name change 2019-05-14 10:23:50 +02:00
Gijs a6e3ddfc79 Add `--digestfile` flag to output built digest to file.
This flag, when set, takes a file in the container and writes the image digest to it. This can be used to extract the exact digest of the built image by surrounding tooling without having to parse the logs from Kaniko, for example by pointing the file to a mounted volume or to a file used durint exit status, such as with Kubernetes' [Termination message policy](https://kubernetes.io/docs/tasks/debug-application-cluster/determine-reason-pod-failure/)]

When the flag is not set, the digest is not written to file and the executor behaves as before. The digest is also written to file in case of a tarball or a `--no-push`.

Closes #654
2019-05-02 14:57:44 +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
Kartik Verma fa2a2c803b
Updated PR Branch with master 2019-04-09 02:18:28 +05:30
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
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 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
Kartik Verma 2f8bdd99b7
Resolved Merge Conflicts 2019-02-02 11:28:40 +05:30
Daisuke Taniwaki f8f59ea4c6 Add insecure-registry and tls-skip-verify-registry flags (#537) 2019-01-29 13:29:47 -06:00
Dan Cecile d52691f53d
Fill in missing docs for --insecure 2019-01-08 21:12:24 -05:00
Niels Denissen 1e5286cbad
Add desc for `--skip-tls-verify-pull` to README
Add a description for the `--skip-tls-verify-pull` option in the README.
2018-12-17 16:38:01 +01:00
Nándor István Krácser a49fd79e0e Fix --cleanup description (#467) 2018-11-27 12:53:40 -08:00
Achilleas Pipinellis 097ccb67a7 Cleanup readme (#386)
- Add newlines after headings and remove whitespace
- Use doctoc to update the Table of Contents
- Get additional flags in alphabetical order
2018-11-21 08:59:20 -06:00
Kartik Verma fdac2fa94c
Resolved merge in README 2018-11-02 19:46:48 +05:30
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 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 458152910a
Merge pull request #409 from dtaniwaki/insecure-pull
Separate Insecure Pull Options
2018-10-26 15:00:27 -07:00
Jason Hall b8c1314b39
"Container Builder" - > "Cloud Build" 2018-10-26 16:44:18 -04:00
Daisuke Taniwaki e8aab7e17e
Update README 2018-10-26 12:20:54 +09:00
Kartik Verma 30640261d2
Updating the Fork 2018-10-02 16:21:44 +05:30
Vincent Behar 49ab8e4979
Add a new flag to cleanup the filesystem at the end
Currently, kaniko can only build a single image per container run, because the filesystem is full of the content of the first image.
When running kaniko in Jenkins, where we need to start the container "doing nothing" first (using the debug kaniko container), and then exec /kaniko/executor, this is a limitation because it means that if we want to build multiple images, we need to start multiple containers - see https://groups.google.com/forum/#!topic/kaniko-users/_7LivHdMdy0 for more details

A solution to fix this issue is to add a new flag to cleanup the filesystem at the end - the same way it is done between stages when building a multi-stages image. This way, the same (debug) container can be used to build multiple images.
2018-09-28 10:25:33 +02:00
Priya Wadhwa cd2fedf9d2 Update README to add information about layer caching 2018-09-25 10:25:35 -07:00
Kartik Verma 312fd28fc8
Updated README with Git buildcontext 2018-09-04 00:01:32 +05:30
Sebastian Jackel 3a58f20927 Added --insecure and --skip-tls-verify flag to README 2018-08-30 09:34:31 +02:00
Christie Wilson 6dccd4ec4a Make it more clear the mtime issue is theoretical
Although we were able to reproduce this with the previous behaviour of
the COPY and ADD commands, we have fixed that issue and our attempts to
cause the issue to occur with RUN did not succeed, so it may be that in
practice this will never happen.
2018-08-23 18:23:46 -07:00
Christie Wilson 607af5f7a6 Always snapshot files in COPY and RUN commands
Kaniko uses mtime (as well as file contents and other attributes) to
determine if files have changed. COPY and ADD commands should _always_
update the mtime, because they actually overwrite the files. However it
turns out that the mtime can lag, so kaniko would sometimes add a new
layer when using COPY or ADD on a file, and sometimes would not. This
leads to a non-deterministic number of layers.

To fix this, we have updated the kaniko commands to be more
authoritative in declaring when they have changed a file (e.g. WORKDIR
will now only create the directory when it doesn't exist) and we will
trust those files and _always_ add them, instead of only adding them if
they haven't changed.

It is possible for RUN commands to also change the filesystem, in which
case kaniko has no choice but to look at the filesystem to determine
what has changed. For this case we have added a call to `sync` however
we still cannot guarantee that sometimes the mtime will not lag, causing the
number of layers to be non-deterministic. However when I tried to cause
this behaviour with the RUN command, I couldn't.

This changes the snapshotting logic a bit; before this change, the last
command of the last stage in a Dockerfile would always scan the whole
file system and ignore the files returned by the kaniko command. Instead
we will now trust those files and assume that the snapshotting
performed by previous commands will be adequate.

Docker itself seems to rely on the storage driver to determine when
files have changed and so doesn't have to deal with these problems
directly.

An alternative implementation would use `inotify` to track which files
have changed. However that would mean watching every file in the
filesystem, and adding new watches as files are added. Not only is there
a limit on the number of files that can be watched, but according to the
man pages a) this can take a significant amount of time b) there is
complication around when events arrive (e.g. by the time they arrive,
the files may have changed) and lastly c) events can be lost, which
would mean we'd run into this non-deterministic behaviour again anyway.

Fixes #251
2018-08-23 18:23:39 -07:00
Priya Wadhwa cfa822f178 Refactor command line arguments and the executor
In this refactor I:

1. Created KanikoOptions to make it easier to pass around arguments
passed in through the command line
2. Reorganized executor.go by putting the logic for pushing the image in
a new file push.go
3. Made some error messages clearer
4. Fixed a mistake in the README for pushing to AWS
5. Marked the --bucket flag as hidden since we want people to use
--context instead, and marked an aws flag as hidden which is set in a
vendored directorya
2018-08-23 13:30:36 -07:00
David McKay 4535039be9
Add Flag to Disable Push to Container Registry
The flag, `--no-push`, is added to allow building a container image
without pushing to a container registry. It can be common, especially
with multi-stage builds and `--target`, to build enough to run the tests,
and then perform a push in a separate CI step. This will facilitate these
workflows.
2018-08-17 17:49:47 +01:00
priyawadhwa cac00b9cb2
Add --target flag for multistage builds (#255)
* Add --target flag for multistage builds

* change validate to validateTarget
2018-07-30 09:43:23 -07:00
John Oss acf0688195 Fix spelling mistake in README (#249) 2018-07-24 10:53:00 -07:00
Christie Wilson 697ad41bc5 Add logo to README (#236) 2018-07-18 11:44:23 -07:00
Christie Wilson d293df5c47 Add DEVELOPMENT.md (#238)
This commit adds docs aimed at folks interested in ramping up and
contributing to kaniko.

It starts with setting up a github account and forking to make sure the
barrier to entry is as low as possible.
2018-07-18 10:52:37 -07:00
Jason Hall f2ddefc966 Add Travis CI badge to README.md (#241) 2018-07-18 08:41:47 -07:00
priyawadhwa a80a7ded35
Update readme (#230)
* update readme

* update readme
2018-07-09 16:51:36 -04:00
Priya Wadhwa 3e7d8b219a update readme 2018-07-03 11:59:14 -07:00
Priya Wadhwa d82fb26f81
update readme 2018-06-01 09:22:53 -07:00
Priya Wadhwa 8ed3051f11
Docs for kaniko in gVisor 2018-05-21 15:24:10 -07:00
Carlos Sanchez 085b5c59bf
Merge branch 'master' into credentials-pass 2018-05-15 09:14:44 +02:00
Priya Wadhwa 81b577148a
Update README 2018-05-14 16:07:29 -07:00
Aleksa Sarai 58743ba686
README: slight corrections about privileges
The previous document did not mention that Docker runs as root, and so
some of the benefits of the tools being compared (such as img,
orca-build, and umoci) were not properly explained. This is quite
important because while Kubernetes users have Docker installed (on most
clusters), on local machines and non-Kubernetes workloads the story is
quite different.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2018-05-14 15:49:28 +10:00
Priya Wadhwa 33f4805f62
Merged master, fixed merge conflict 2018-05-10 13:51:23 -07:00
Priya Wadhwa bb90bdef2f
Merge branch 'master' of github.com:GoogleContainerTools/kaniko into busybox 2018-05-10 11:18:27 -07:00
Priya Wadhwa 26d8501489
Support BuildArgs for arg command 2018-05-09 12:24:38 -07:00
Priya Wadhwa 3da6215db4
Create debug image with busybox shell 2018-05-07 15:18:28 -07:00
Priya Wadhwa 5f547b163b
Merge branch 'master' of github.com:GoogleContainerTools/kaniko into aws 2018-05-07 09:24:00 -07:00
Priya Wadhwa 8d3731a984 Add credential helper and docs for pushing to Amazon ECR 2018-05-02 17:15:53 -04:00
Priya Wadhwa fe23751fac Add demo to README 2018-05-02 17:00:47 -04:00
Christian Jantz e23003aff3 Removed stopsignal from README as missing command 2018-05-02 08:16:38 +02:00
priyawadhwa 6ff3c588af Update readme (#160) 2018-04-30 15:59:04 -07:00
Priya Wadhwa 02f199e101
Update readme for debug image 2018-04-25 16:08:25 -07:00
Priya Wadhwa 61d3c66b5f
update readme 2018-04-24 13:19:09 -07:00
Alban Crequy 7ceba77ef0 README.md: fix link (#138) 2018-04-22 10:01:27 -07:00
Carlos Sanchez 4fa6c28e34 Document config.json authentication
Works with the standard kaniko docker image
2018-04-21 09:32:10 +02:00
Nick Kubala 856265ee30
fix readme 2018-04-20 09:51:44 -07:00
priyawadhwa 84d034423f
Merge pull request #115 from priyawadhwa/readme
Update README with Security section
2018-04-18 09:43:34 -07:00
Priya Wadhwa 7cf4cb228a
fixed grammar 2018-04-17 14:53:17 -07:00
Priya Wadhwa 30f6af68ed
update readme 2018-04-17 14:11:33 -07:00
Matt Rickard cff201dee6 org rename from GoogleCloudPlatform to GoogleContainerTools 2018-04-17 11:45:39 -07:00
Priya Wadhwa bb5fc24847
fix error 2018-04-16 16:52:23 -07:00
jonjohnsonjr 4fcd7a3a09
Update README.md
Typo: Multi-State -> Multi-Stage
2018-04-16 10:54:25 -07:00
dlorenc 59f09eb07b
Some readme tweaks. (#80) 2018-04-14 08:00:32 -07:00
Priya Wadhwa cf90bd73d4
Fixed merge conflict 2018-04-11 15:05:12 -07:00
Priya Wadhwa 885987076e
Change k8s Job to Pod 2018-04-10 15:23:05 -07:00
Priya Wadhwa ab76d0f541
changed kbuild to kaniko 2018-04-06 12:11:17 -07:00
Priya Wadhwa 0342d64bd2
fixed readme 2018-04-05 15:29:05 -07:00
Priya Wadhwa c63a03d123
rename to kaniko 2018-04-04 14:52:13 -07:00
Priya Wadhwa 4e2bf40736
Merged master 2018-04-04 13:35:20 -07:00
Priya Wadhwa bf662d986b
Merge branch 'master', add examples 2018-04-04 10:42:14 -07:00
Priya Wadhwa fad0d25aec
Add README and update name to kaniko 2018-04-02 14:00:15 -07:00
Priya Wadhwa c9004d2fd4
Initial commit 2018-01-25 14:22:07 -08:00