Speed up Dockerfile build time #172
-
Hi, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello @useragent7, An approach to improve caching could be the following:
continue with the rest of the docker build. With that the backend build does not need to be executed again as long as the contents of the See also the docker documentation on best practices for docker files: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/ If you optimize the |
Beta Was this translation helpful? Give feedback.
Hello @useragent7,
as you mentioned Java, I assume you mean the built artifacts from the
backend
folder, right?The docker build currently does not cache any build artifacts, neither from the backend nor the frontend.
This is the case because the backend and frontend are all built in one single step.
Because the whole coffee-editor workspace is copied before (see here), all following steps of the docker build have to be re-executed when ANY file in your workspace changes that is not excluded by the
.dockerignore
file (this is called cached invalidation in case you want to look it up).An approach to improve caching could be the following: