From a12f0f403d9391e6c228eca61de7a29f19feb1bc Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Thu, 19 Nov 2015 13:29:16 -0800 Subject: [PATCH] updated caching docs [CI SKIP] --- DOCS.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/DOCS.md b/DOCS.md index d351e70..1df1f31 100644 --- a/DOCS.md +++ b/DOCS.md @@ -56,8 +56,10 @@ publish: ``` Note that in the above example we quote the version numbers. If the yaml parser interprets the value as a number it will cause a parsing error. + +## Layer Caching -You may want to cache Docker image layers between builds to speed up the build process: +The Drone build environment is, by default, ephemeral meaning that you layers are not saved between builds. The below example combines Drone's caching feature and Docker's `save` and `load` capabilities to cache and restore image layers between builds: ``` publish: @@ -79,6 +81,8 @@ cache: - docker/image.tar ``` +In some cases caching will greatly improve build performance, however, the tradeoff is that caching Docker image layers may consume very large amounts of disk space. + ## Troubleshooting For detailed output you can set the `DOCKER_LAUNCH_DEBUG` environment variable in your plugin configuration. This starts Docker with verbose logging enabled.