Risk Level: informational
Spectral Rule ID: DOCKR001
If you have multiple Dockerfile steps that use different files from your context,
COPY them individually, rather than all at once. This ensures that each step's build cache is only invalidated (forcing the step to be re-run) if the specifically required files change.
ADD https://example.com/big.tar.xz /usr/src/things/ RUN tar -xJf /usr/src/things/big.tar.xz -C /usr/src/things RUN make -C /usr/src/things all - ADD requirements.txt /tmp/ + COPY requirements.txt /tmp/ RUN pip install --requirement /tmp/requirements.txt
Updated 3 months ago