Giter Site home page Giter Site logo

Not working on alpine linux about jwt-cli HOT 9 CLOSED

mike-engel avatar mike-engel commented on September 13, 2024 1
Not working on alpine linux

from jwt-cli.

Comments (9)

folliehiyuki avatar folliehiyuki commented on September 13, 2024 2

Hi! Just let you know that I'm making an attempt to package jwt-cli for AlpineLinux at https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/46338.

It already works on my machine after the build. If the MR gets merged, you can install the package directly from Alpine's edge repo.

from jwt-cli.

mike-engel avatar mike-engel commented on September 13, 2024

I'm not sure that this is an issue with jwt-cli specifically? This seems like an issue with the docker setup or alpine linux where it can't find the executable. jwt-cli has no concept, as far as I know, about its environment and definitely doesn't call itself during execution. Could this be a permissions issue? chmod +x /usr/local/bin/jwt?

from jwt-cli.

ukreddy-erwin avatar ukreddy-erwin commented on September 13, 2024

still same issue, i don't know why this question is closed without resolution.
Could you please share that, if you missed to paste.

The environment I provided also easy to replicate as just single docker run command shared in my first comment

from jwt-cli.

mike-engel avatar mike-engel commented on September 13, 2024

Sorry, I assumed this wasn't a problem with the jwt binary.

Upon further inspection, alpine linux seems to require a static binary (not dynamically linked). This would require rust to be built with the musl target, but unfortunately ring, which is a transitive dependency of jsonwebtoken doesn't support static linking: briansmith/ring#713

Until ring supports static linking via the musl target, jwt won't be able to run on alpine linux. Sorry! I'll leave this issue open for now though

from jwt-cli.

tomwiggers avatar tomwiggers commented on September 13, 2024

Hi, I think it is a good idea to document your findings. I now also spent a few hours facing the same issue on a busybox container with the most recent version.

Basically using the same method as OP. It is also not possible to pass it as argument to sh:

$ sh jwt
jwt: line 1: syntax error: unexpected "("

edit: a workaround seems to be to just use the rust container image.

from jwt-cli.

mike-engel avatar mike-engel commented on September 13, 2024

Added a note with 10cea20. Thanks all!

from jwt-cli.

mike-engel avatar mike-engel commented on September 13, 2024

Looks great, thanks @folliehiyuki!

from jwt-cli.

Rogach avatar Rogach commented on September 13, 2024

FYI - currently static executable builds without issues with x86_64-unknown-linux-musl target and rustc 1.77.0-nightly (only had to update proc-macro2 dependency to avoid the unknown feature proc_macro_span_shrink error).

from jwt-cli.

ajschmidt8 avatar ajschmidt8 commented on September 13, 2024

Sorry, I assumed this wasn't a problem with the jwt binary.

Upon further inspection, alpine linux seems to require a static binary (not dynamically linked). This would require rust to be built with the musl target, but unfortunately ring, which is a transitive dependency of jsonwebtoken doesn't support static linking: briansmith/ring#713

Until ring supports static linking via the musl target, jwt won't be able to run on alpine linux. Sorry! I'll leave this issue open for now though

The linked ring issue seems resolved now.

Can this issue be revisited to support Alpine?

from jwt-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.