Problem
I am new to the Elm community (this is my first post) and have zero open source contribution experience, but think Issue #1949 could be resolved by improving the current Dockerfile in Elm compiler source. My hypothesis does require new build practices to be followed by Elm maintainers. As such, I hope this community post is an appropriate way to gauge feasability and interest.
Hypothesis
Elm compiler source dockerfiles used to distribute official elm
binaries are instructively transparent for community builders. Given the Dockerfile format is human-and-machine readable (like Markdown), maintainers could answer questions like "How do I bulid elm@x.y.z
on distro abc
" by pointing to Dockerflie.abc
in git clone --branch x.y.z https://github.com/elm/compiler.git
. The main benefit over regular instructions is that automated Docker Hub builds could empirically show which Dockerfile instructions succeed or for what reasons they fail. (For instance, not having updated ca-certificates
leads to HTTP.elm
compilation problems.)
Background
The current compiler/installers/linux/Dockerfile
successfully builds a static elm
binary. Iâve tried to improve upon this base in three different dockerfiles called Dockerfile
, Dockerfile.alpine
, and Dockerfile.debian
:
-
Dockerfile
copies an amd64 static binary to an empty docker image for reduced size and easier extraction. -
Dockerfile.alpine
copies a non-static amd64 binary onto a Dockerhub Node image for use in amd64 CI/CD. -
Dockerfile.debian
copies a non-static multiarch binary onto Docker Hub Node for use in multiarch CI/CD or to extract multiarch binaries for ChromeOS 80âs Buster based Linux container
All three versions COPY
source code over using git
, which makes automated Docker Hub builds a bit faster. In addition, I think these non-git-based-dockerfiles could resolve âIssue #1949: requests for âbuild from sourceâ instructionsâ by showcasing how to build and deploy the tagged branch of Elm they reside in. (The idea being if you want to build 0.19.2 or 0.20.0 youâd inspect their dockerfiles for hints like âdoes it use stack?â, âdoes it use cabal?â, or âwhere did the automated Docker Hub build fail/pass between version bumps?â)