I am trying to setup a docker container and am using RUN ls
to help debug. However, when I run RUN ls
, docker prints out the following:
<
Docker caches recently built layers so that subsequent builds can reuse them.
The simplest way to break this behavior is to use the --no-cache
flag during build:
docker build --no-cache ...
However this will invalidate all cached layers. If you still want to use cached layers for layers before the RUN ls
instruction, you can put the following line before it:
ARG CACHE_TS=default_ts
And then gives this argument a new value on every new build:
docker build --build-arg CACHE_TS=$(date +%s) ...
Please see this Github issue: https://github.com/moby/moby/issues/22832