Open asfaltboy opened 6 months ago
Oops... Will have to look into this... Any additional info about your setup? (OS, version, installed libs...) As it's working for other people, I guess it's related to a conflict somewhere.
Same issue here. I'm on macOS 14.2.1 (M1 Pro), using OrbStack/buildkit. I'm not sure how else I can help, let me know if you have any questions!
Hi. Thanks for letting me know. I don't have a Mac so not sure how to reproduce.
So I think this is either an issue with Elixir images defaulting to supporting amd64 builds (e.g. This issue on the Elixir Forums) OR an Elm issue along the same vein. I'm currently doing some testing locally with different containers that would run with a new ARG to specify platform.
Okay. I did a whole write-up about the issue and why I couldn't fix it and what needs to be done next. While writing it I figured out the issue and raised a PR: https://github.com/azimuttapp/azimutt/pull/311/
Explanation of the issue:
Problem 1: Irrelevant to what your OS is, the Dockerfile still pulls in the Linux x64 version of the elm binary. Normally Docker is able to mitigate issues when you run in compatibility mode on M1 chips, but when you try to execute the elm binary you will get the segmentation fault. Normally you would be able to change the URL to download the ARM version instead but elm does not publicly distribute an arm binary specifically for Linux devices so replacing the wget
line mentioned above would need to get a compiled binary elsewhere.
Solution 1: I thought about creating a pre-compiled binary and hosting it on Github, but ultimately went down the route of writing a new image that compiles the binary itself so that you could easily tie it into a Dockerfile or run it locally and copy the binary directly to your system. It seemed to be more beneficial in the long run once the image is on your system.
Problem 2: The elm-coverage devdependency has elm@0.19.1-6
as a sub-dependency which will reach out to npm to get the package, realize you are on an arm device and crash with a message detailing that there are no arm binaries available to download - can be seen on Line 73 in the install.js file of the npm package.
Solution 2: Unfortunately the only thing that worked for me was to remove the dependency altogether. A developer with more pnpm experience should be able to create a local npm link to prevent elm-coverage from reaching out to npm, but I figured a "prod" environment sooner rather that later would be better for everyone wanting to use this.
Best of luck!
I just checked out the repo, am on
main
branch, and can't start the app with docker-compose.Here are the steps that I followed:
gh clone repo azimuttapp/azimutt
cd azimutt
cp .env.example .env
docker-compose up
Full error logs: