Closed sashaafm closed 6 years ago
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
having the exact same issue, any updates?
I decided to go with Debian but I believe the problem still persists.
On 9 Nov 2017, at 10:08, Thomas Sattlecker notifications@github.com wrote:
having the exact same issue, any updates?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
We're encountering the same kind of error. I guess we're going to switch to another system too :(
I have run into this lately as well
Directly pulling the binaries into an image based on Alpine 3.6, adding gmp
, then interactively running a container and issuing ldd ./elm-make
reports:
Error relocating ./elm-make: printf_chk: symbol not found
Error relocating ./elm-make: __vfprintf_chk: symbol not found
Error relocating ./elm-make: strncpy_chk: symbol not found
Error relocating ./elm-make: sprintf_chk: symbol not found
Error relocating ./elm-make: __fdelt_chk: symbol not found
Error relocating ./elm-make: fprintf_chk: symbol not found
Error relocating ./elm-make: __memcpy_chk: symbol not found
I believe these symbols are native to glibc, whereas Alpine's libc is musl and does not support them
There is an APK that can be added that will provide glibc here; unfortunately it is unavailable in the official repository. I have an example Dockerfile with elm-make building hello-world.elm here. Hopefully this can help someone else out; unfortunately for my case I'm unlikely to be able to use an APK unavailable in the official repository.
The same problem here.
It seems this is due to how GHC generates code. I know they do no dynamic linking of Haskell code, but they do some with C code, so I suspect @mckinley-olsen-oc is the best advice you can get without talking to GHC people.
I cannot figure out any concrete action items based on this, so I am going to close.
In case anyone runs into this I solved it by using https://github.com/frol/docker-alpine-glibc and apk add --no-cache gmp yarn && yarn global add elm@0.18.0
.
My full Dockerfile including a unprivileged user.
FROM frolvlad/alpine-glibc
RUN set -ex \
&& apk add --no-cache shadow \
&& groupadd -g 9999 deploy \
&& useradd -r -u 9999 -g deploy deploy \
&& apk del shadow \
&& mkdir /home/deploy \
&& chown deploy:deploy /home/deploy \
&& mkdir /app \
&& chown deploy:deploy /app
RUN apk add --no-cache gmp yarn
WORKDIR /app
RUN yarn global add elm@0.18.0
USER deploy
Edit: Noticed mckinley-olsen-oc had a similar suggestion above (https://github.com/mckinley-olsen-oc/alpine-elm/blob/master/Dockerfile).
I asked somebody how we could solve this problem.in elm and he gave me this hint:
@andys8 I imagine a common solution to be to compile your program on Alpine, and link it statically. Then it will work on Alpine as well as pretty much every Linux system in existence.
@sashaafm @littleStudent @Bastes @mckinley-olsen-oc @joakimk @andys8
Hello folks!
It seems that I solved this problem. Please, check out this links:
https://github.com/wunsh/docker-alpine-elm https://hub.docker.com/r/wunsh/alpine-elm/
This is pure Alpine 3.7 image with built Elm 0.18.
I also have another solution using Yarn, but I think this is no so interesting like pure Alpine with Elm binaries above.
If you try to deploy your Elm app with now to zeit.co this might be helpful for you: https://github.com/synalysis/deploy-elm-now-zeit
elm-make creates a coredump on zeit.co (Alpine Linux) when deploying with now without Dockerfile.
Hello, I've been trying to build a Docker image for a project which uses Elm, and I cannot get
elm-make
to work no matter what.I'm adding and installing
npm
andelm
like this:And then I get into the container and I'm trying to build the source like so:
I've seen several threads and forums regarding issues similar to this, but they're usually directed at Ubuntu/Debian, and so far no solution worked for me.
I've tried installing locally once inside the container and this is the result:
And running
elm-make
which yields the same error.If someone could help with this I'd be most thankful. For the time being I'm going to try using a Debian base image, but I'd really rather use an Alpine base.