I have setup my CI to use a base python docker image to run unit tests.
test: image: registry/btg/docker-images/linux/dev:latest services: - postgres:10.5 - redis:latest stage: test script: - "pwd" - "pip3 install -U pip" - "pip3 install -r requirements_test.txt -c constraints.txt" - "python3 manage.py test"
The above is working fine but slow, as it installs requirements everytime even there is no requirement changes.
I am aware I can prepare another base docker image with dockerfile using the
ADD instruction to optimize as per Speed Up The Build of Your Python Docker Image · vsupalov.com however the docker executor does not involve docker build.
How do I optimize this step?