4 ms·
I usually structure the Dockerfile to make the installation step cacheable, like so: # This only re-runs the slow installation when requirements.txt change
by myhf 12y ago
I usually structure the Dockerfile to make the installation step cacheable, like so:
# This only re-runs the slow installation when requirements.txt changes
ADD requirements.txt /app/requirements.txt
RUN pip install -r /app/requirements.txt
# This re-runs every time you change any file, but is very fast
ADD . /app/