Open mvysny opened 1 year ago
I was thinking bind mount, but that's not available in docker build
: https://stackoverflow.com/questions/26050899/how-to-mount-host-volumes-into-docker-containers-in-dockerfile-during-build
However, the Docker BuildKit might contain a solution: https://docs.docker.com/build/buildkit/
This is also interesting: https://zwbetz.com/reuse-the-gradle-dependency-cache-with-docker/
On closer look, this could be very hard to implement. It requires fiddling with Dockerfile and adding another build stage which builds the "-cached" image; then on next run the Dockerfile needs to be modified to start off this "-cached" image. This could create an endless string of docker images.
Maybe a better way would be to modify Dockerfile and tar the folders to an archive then store it on a private ftp, then untar the folders before build.
Cache the following folders between builds:
~/.gradle
~/.m2
~/.vaadin
node_modules