I have a Dockerfile containing the following:
FROM ubuntu:17.10
WORKDIR /app
ADD . /app
RUN apt-get update && apt-get install -y \
python3-pip \
python3-numpy \
ffmpeg \
python3.6 \
xz-utils
...
The layer created at the RUN
statement is removed every time I run docker build
and I'm not sure why this is the case. Installing all the dependencies takes a long time, so I'd like for Docker to cache that layer and use it again in the future.
What can I do to get that behaviour?
Thank you.