Closed gunr2171 closed 3 years ago
Thank you for raising this issue and providing such clear instructions on how to reproduce. I will investigate.
npm shouldn't be a requirement. I used Excubo.WebCompiler for ages on my device, which didn't have npm installed until very recently. But it is likely that the absence of some libraries is indeed the culprit.
I'm suspecting that this issue is related to https://github.com/Taritsyn/JavaScriptEngineSwitcher/issues/88
Possible, would need a gdb bt to be sure
From a bit of research on the topic, it seems that alpine is riddled with issues like this, where libraries aren't found / linked properly. I tried hacking in the right commands, but failed since the ldconfig
command on alpine behaves differently to other linux distributions.
I would therefore recommend to stay away from alpine. Even if it were possible to find a fix and paste it into a Dockerfile, it simply isn't worth the effort if there are alternatives working out of the box, such as using a ubuntu-based image.
If alpine is required for other build steps, I advise to use multiple build steps in docker and copying the output files from the webcompiler command to the alpine-based build step.
Alpine is a very minimal Linux distribution and should only be used if you're trying to create a very small docker image
I added a small paragraph about docker/alpine in the Readme: https://github.com/excubo-ag/WebCompiler#docker Given how easy it is to create a multi-stage build, I can only recommend using alpine exclusively for non-build tasks.
This is the same issue as #18, except it's for the 5.0 docker image. This was tested with version 2.6.4 of WebCompiler.
Here are some Linux Dockerfiles to reproduce the problem and show it working with non-alpine.
Running with the
5.0-alpine
tag. Both install methods (first globally, then locally) have an exit code 139 with no error message when running...webcompiler -r .
.Same steps, but this time running with the
5.0
tag (ubuntu). Both install methods (first globally, then locally) succeed.