Whilst developing a custom task using the Dockerfile-multiple rebuilding the Dockerfile while editing the python code also forced pip to install all dependencies again. So instead of copying the complete code path we first copy the requirements and install them using pip.
This now gives us the benefit that Docker will cache this intermediate image and only when we change the requirements.txt a rebuild is triggered. So development speed that relies on the Dockerfile-multiple is increased dramatically.
Whilst developing a custom task using the Dockerfile-multiple rebuilding the Dockerfile while editing the python code also forced pip to install all dependencies again. So instead of copying the complete code path we first copy the requirements and install them using pip.
This now gives us the benefit that Docker will cache this intermediate image and only when we change the requirements.txt a rebuild is triggered. So development speed that relies on the Dockerfile-multiple is increased dramatically.