COPY
in webapp.io does not invalidate the cache when it runs, instead the
files copied are monitored for read/write starting at that point. This means
that COPY . .
is much more common in Layerfiles than DockerfilesCOPY /file1 .
or
COPY ../.. .
) and inherit from other Layerfiles
FROM ../../other/Layerfile
package.json
, the default webapp.io cache will
skip the entire pipeline after every push.
The CACHE
directive only acts to speed up the npm ci
step in this case.
Note that CACHE
will “leak” state across runs, so it might allow one run to
break all following ones until someone force-retries without caches. To avoid
this problem, only cache stateless directories (which usually contain “cache” in
their paths)
Some other examples: