My Dockerfile below has RUN pip install commands on each line. This
is done so that each time I run my docker build command it doesn’t
take forever to build.
Now, let’s suppose I want to build mchirico/facebook-group-scrape:latest. The
first time I run this, it’s going to upgrade pip, gunicorn, numpy and then
take forever pulling down pandas. Obviously, after you pull down pandas,
you want to pip to store this in the cache. In order to cache the results
of pip, you have to put each one on a separate line.