New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spectral cli doesn't work in alpine docker image #1374
Comments
I'm also having this issue |
Hi, I ran into this issue this afternoon and investigated it a bit. Alpine is a very lightweight linux distribution (as it's intended for use in Docker), and one of the ways that they achieve their lightweight status is by shipping with
NOTE - I had to install "libgcc" and "libstdc++" by running:
I believe that all of the remaining relocation errors are due to the missing glibc. So, ideally we'd be able to build the spectral-cli without this dependency on glibc --- the good news is that I took a look at https://www.npmjs.com/package/pkg I'm thinking that we could update the CI configuration to also build the alpine linux binaries (leveraging the --targets flag of pkg), and then include those binaries when cutting a release. I'm not sure exactly what the next steps for that are, but I would love to see that happen so that embedding spectral in docker containers becomes easier! Also want to note that even after this I think that installing |
We adjusted the process to include the alpine builds and they're attached to each new release now. |
Describe the bug
spectral binary doesn't work in alpine docker image
To Reproduce
spectral --help
Expected behavior
Help info is displayed.
Additional context
$ docker run -ti alpine $ apk add curl $ curl -L https://raw.githack.com/stoplightio/spectral/master/scripts/install.sh | sh Spectral was installed to: /usr/local/bin/spectral $ spectral --help /bin/sh: spectral: not found $ ls -la /usr/local/bin/spectral -rwxr-xr-x 1 root root 57092527 Oct 4 22:12 /usr/local/bin/spectral
The text was updated successfully, but these errors were encountered: