Webapp.io uses snapshots to speed up your code in a few simple ways:
If a snapshot is loaded, all the steps above it are skipped. This means that costly, repetitive steps that don’t read many files should be placed as high up in the Layerfile as possible to avoid rerunning.
Snapshots created on a
RUN REPEATABLE directive have a special property: the
files restored are from after the file last ran. A more detailed explanation on
RUN REPEATABLE and a
contrast between webapp.io and Docker’s caching systems
are available for further reading. Some potential inefficiencies in the use of
the layer caching system are listed below:
Docker reading the entire directory:
docker build copies all files in the
context directory that aren’t ignored by a
.dockerignore file. Since webapp.io
tracks which files are read, this causes webapp.io to rerun if any of the files
read by Docker are changed. An easy solution is to add a
that stops docker from reading irrelevant files.