Open jgwest opened 5 years ago
@jgwest - I've changed the template Dockerfiles for spring and microprofile to obtain Java in a faster way. (From IBM docker images rather than DHE.) This has sped up the builds and also means that the Dockerfiles for those projects are now out of sync with: https://github.com/eclipse/codewind/blob/master/src/pfe/file-watcher/dockerfiles/liberty/libertyDockerfile
Do I need to update that file as well? (I wasn't aware of it when I made the changes to the templates.) Is it worth updating that file? The builds are much faster now.
Edit: I think libertyDockerfile
and the javaMicroProfileTemplate have been out of sync since this change https://github.com/codewind-resources/javaMicroProfileTemplate/commit/030938e773bc4d83de30bb2163b507ba1f1cfbd6
@hhellyer The Dockerfiles are used to build template cache image to speed up the build when user creates project from our templates. There are no errors if we don’t update, but from performance perspective we should always update.
I'll update, it looks like it's just a matter of concatenating Dockerfile
and Dockerfile-build
together to produce the dockerfile used to generate the cache so updating should be simple.
I'll update, it looks like it's just a matter of concatenating
Dockerfile
andDockerfile-build
together to produce the dockerfile used to generate the cache so updating should be simple.
Yes, it's very simple, to test the update, we just need to ensure creating new projects from templates can pick up the cache image.
Description: The MicroProfile (and Spring) Codewind caches are currently only generated on initial install of Codewind. This means that if the MP/Spring template's Dockerfile changes after the initial install of Codewind, the cache will no longer work as intended.
Thus, if the template changes after user install of Codewind, every time they create a new MicroProfile project, or disable/re-enable an existing project, they will then have to wait 10-30 minutes for the container image to rebuild (with the vast majority of the time being the Java download, a separate issue).
Also see https://github.com/eclipse/codewind/issues/169, which has the same symptom but a different cause (169 refers to a specific instance of mismatch, this issue refers to the general problem of mismatch).
Steps to reproduce: Tough to reproduce directly, but here are the steps the user would follow to get into this situation:
1) Install Codewind. 2) At some point after install, the MicroProfile public template Dockerfile changes, such that is no longer consistent with the cache Dockerfile (https://github.com/eclipse/codewind/blob/master/src/pfe/file-watcher/dockerfiles/liberty/libertyDockerfile I believe) 3) From now on, if you create a new project Codewind project from Eclipse/VSCode, it will now take 10-30 minutes to build (due to Java download, a separate issue).