You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been playing with the twailwindcss v4 standalone binary and I have encountered a problem when using with an alpine Docker container. The binary appears to not be statically linked. The following Dockerfile example demonstrates the issue
FROM alpine:3.21.3
# download and install tailwindcssRUN wget https://github.com/tailwindlabs/tailwindcss/releases/download/v4.0.14/tailwindcss-linux-arm64-musl --output-document tailwindcss \
&& chmod +x tailwindcss \
&& mv tailwindcss /usr/local/bin/
RUN tailwindcss --help
Build the Docker container:
docker build -t tailwindcss
And you will get the following error:
0.123 /bin/sh: twailwindcss: not found
------
Dockerfile-tailwind:8
--------------------
6 |&& mv tailwindcss /usr/local/bin/
7 |
8 | >>> RUN tailwindcss --help
--------------------
ERROR: failed to solve: process "/bin/sh -c tailwindcss --help" did not complete successfully: exit code: 127
The key part of the error is tailwindcss: not found.
If the Dockerfile is modified to install build-base then everything works:
It seems this same issue existed in v3 of tailwindcss (#6690) and static binaries were discussed (#6785) and ultimately a PR sent in with the enhancement (#6914). Can we get a similar build artifact for tailwindcss v4?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have been playing with the
twailwindcss
v4 standalone binary and I have encountered a problem when using with an alpine Docker container. The binary appears to not be statically linked. The following Dockerfile example demonstrates the issueBuild the Docker container:
And you will get the following error:
The key part of the error is
tailwindcss: not found
.If the Dockerfile is modified to install
build-base
then everything works:It seems this same issue existed in v3 of tailwindcss (#6690) and static binaries were discussed (#6785) and ultimately a PR sent in with the enhancement (#6914). Can we get a similar build artifact for tailwindcss v4?
Beta Was this translation helpful? Give feedback.
All reactions