Hello! After the recent package.elm-lang.org situation we’re trying to cache the ELM_HOME directory in Docker/Drone CI, to be more resilient to zipballs HTTP request outages and also to not do needless work in each CI build.
The problem we’re dealing with is: we don’t want to trigger downloading packages on every application code change (
The way Dockerfiles work makes us do:
- ADD elm.json
- ADD all the various source_directories (we have a lot of them)
- RUN elm make some/File.elm --output /dev/null
which has the disadvantage mentioned above.
A workaround I can see is making temporary Elm files which the Dockerfile will then try to compile. Thus skipping the “ADD source directories” step.
But it seems to me something like
elm make --install-only or
elm-json download (cc @ilias) would be more correct solution.
Do you see a different solution?