-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
TailwindCSS Standalone CLI not working in Alpine Linux (docker) #6690
Comments
@altdsoy I use Alpine (3.15) in a VM and the standalone binary works if I install |
@DistantMe I also noticed the same thing but still didn't find a solution. I wonder if it is possible to solve this in the Tailwind side, or does it need to be solved on the |
@DistantMe does adding I agree it would be great if tailwind could build this binary statically linked - I see the pkg docs say:
Not sure if this would affect this project? |
@mveytsman adding @altdsoy, after taking the above into account, I ran the following as a test: On Docker host: Inside Docker container: ... and the general help screen is displayed correctly. |
@DistantMe, Indeed, as also stated by @mveytsman, for me I tried many different libraries (but rather in a random way).. I should have tried in a better way those two one together.. |
I added a suggestion to switch to static builds here: #6785 |
Ran into the same issue with Alpine 3.20. Adding
|
The tailwindcss binary release is not working on Alpine Linux.
Tested with the release tailwindcss-linux-x64 v3.0.7 on the latest docker alpine image.
If I run an alpine container (installing curl, and downloading the standalone release as described here https://tailwindcss.com/blog/standalone-cli#get-started ) I got nothing (binary not found).
Running the exact same steps in debian works.
Tell me if I need to provide more information.
Example steps to reproduce it:
The exact same steps works fine using debian for example:
Edit:
Here is the output of
file
:Seems I need to install some libraries...
Edit 2:
This answer from SO seems relevant to the issue: https://stackoverflow.com/a/66974607
Executables built on glibc distributions depend on /lib/x86_64-linux-gnu/libc.so.6, for example, which is not available on Alpine (unless, they are statically linked).
So is it possible to statically link dependencies when compiling the binaries?
Edit 3:
Some workarounds are based on installing gcompat and/or libc6-compat, but those do not fix the tailwindcss issue.
Edit 4:
I just noticed that the standalone CLI is using a tool called
pkg
under the hood.So maybe this issue does not belong here..
If so, feel free to close.
Edit 5: As stated below, installing both
gcompat
andbuild-base
solves the problem.The text was updated successfully, but these errors were encountered: