Project consists of 2 directories. Both have more or less teh same Dockerfile, the main difference being the base image. The image build from the airflow image is not working as expected in regard to the cache. When updating the poetry pyproject.toml file all dependencies are downloaded, but in the image build upon a simple python image it all works as expected. A more detailed description can be found here.
- install poetry:
pip install poetry==1.1.15
- move to each directory and run
DOCKER_BUILDKIT=1 docker build --progress=plain -t airflow-test -f Dockerfile .
- change some dependency in the toml file
- run
poetry lock
- rerun
DOCKER_BUILDKIT=1 docker build --progress=plain -t airflow-test -f Dockerfile .
- if poetry install is installing only the changed dependency it worked