Why is this step rerunning?
Webapp.io uses snapshots to speed up your code in a few simple ways:
- All processes within a VM are “snapshotted”.
- A snapshot is taken about every 20 seconds.
- Snapshots are marked by a banner below the accompanying step.
- A step will be skipped if the files it uses haven’t changed.
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:
Common problems with Docker
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.