tailwindcss: [V4] Illegal instruction when using beta inside Docker

What version of Tailwind CSS are you using?

v4 beta 9

What build tool (or framework if it abstracts the build tool) are you using?

docker and ruby

What version of Node.js are you using?

🤷

What browser are you using?

For example: N/A

What operating system are you using?

linux

Reproduction URL

Dockerfile

# syntax=docker/dockerfile:1
# check=error=true

FROM docker.io/library/ruby:3.4.1-slim AS base

RUN apt-get update -qq && \
    apt-get install --no-install-recommends -y curl build-essential git pkg-config && \
    rm -rf /var/lib/apt/lists /var/cache/apt/archives

RUN curl -L -o bin/tailwindcss https://github.com/tailwindlabs/tailwindcss/releases/download/v4.0.0-beta.2/tailwindcss-linux-x64 && \
    chmod a+x ./bin/tailwindcss

RUN ./bin/tailwindcss --help

command: docker buildx build --platform linux/amd64 --file Dockerfile.tw . Describe your issue

When trying to execute the beta executable in x86 for linux, it errors with ‘0.054 Illegal instruction’

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 9
  • Comments: 20 (6 by maintainers)

Commits related to this issue

Most upvoted comments

This will be fixed in the next patch release going out today. Thanks again everyone for your help in testing this!

Thank you for all your testing, really appreciate it. Let us get this out asap now 👍

Hey folks! I prepared a PR (#16244) that uses a different bun base that compiles to a reduced instruction set and with that I was able to fix the Dockerfile repro:

[+] Building 13.7s (10/10) FINISHED                                                                                                docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                                               0.0s
 => => transferring dockerfile: 495B                                                                                                               0.0s
 => resolve image config for docker-image://docker.io/docker/dockerfile:1                                                                          0.4s
 => CACHED docker-image://docker.io/docker/dockerfile:1@sha256:93bfd3b68c109427185cd78b4779fc82b484b0b7618e36d0f104d4d801e66d25                    0.0s
 => => resolve docker.io/docker/dockerfile:1@sha256:93bfd3b68c109427185cd78b4779fc82b484b0b7618e36d0f104d4d801e66d25                               0.0s
 => [internal] load metadata for docker.io/library/ruby:3.4.1-slim                                                                                 0.4s
 => [internal] load .dockerignore                                                                                                                  0.0s
 => => transferring context: 2B                                                                                                                    0.0s
 => [1/4] FROM docker.io/library/ruby:3.4.1-slim@sha256:6956f5f6b0661910b7d17933db5a09446baf5bcb56e89e388c0259b4f818c9b2                           0.0s
 => => resolve docker.io/library/ruby:3.4.1-slim@sha256:6956f5f6b0661910b7d17933db5a09446baf5bcb56e89e388c0259b4f818c9b2                           0.0s
 => CACHED [2/4] RUN apt-get update -qq &&     apt-get install --no-install-recommends -y curl build-essential git pkg-config &&     rm -rf /var/  0.0s
 => [3/4] RUN curl -L -o bin/tailwindcss https://assets.tailwindcss.com/tailwindcss-linux-x64 &&     chmod a+x ./bin/tailwindcss                   4.4s
 => [4/4] RUN ./bin/tailwindcss --help                                                                                                             0.9s
 => exporting to image                                                                                                                             7.6s 
 => => exporting layers                                                                                                                            7.6s 
 => => exporting manifest sha256:c61d713094b7abddf40760c8d09e4011689d47650335a8cd9b8335ee120109c7                                                  0.0s
 => => exporting config sha256:3345057f1c03da86dc673878e97c93d22cfc4ad90cf812882595bacc9a4e8e3a                                                    0.0s
 => => exporting attestation manifest sha256:4511f6a91cafd54ace2b81a62b936feb5ccea8a30af06f61beb5d5422dff2461                                      0.0s
 => => exporting manifest list sha256:4c717ac5eaaabad7edb2d42b47287f950d95c8350126c843edb172165a736229                                             0.0s
 => => naming to moby-dangling@sha256:4c717ac5eaaabad7edb2d42b47287f950d95c8350126c843edb172165a736229    

Since it’s a bit hard for us to test across different server setups mentioned above I wanted to ask for your help to figure out if this resolves (at least some) of the issues.

Excuse the unconventional way of deploying the binary but I’ve uploaded preview builds here:

https://assets.tailwindcss.com/tailwindcss-linux-x64
https://assets.tailwindcss.com/tailwindcss-linux-x64-musl
https://assets.tailwindcss.com/tailwindcss-linux-arm64
https://assets.tailwindcss.com/tailwindcss-linux-arm64-musl

@pzgz I think the intention was to try the -linux-x64 binary if you’re on a GNU libc system, and the -linux-x64-musl binary if you’re on a Musl libc system (like Alpine).

Fwiw that repro dockerfile up above was being run using orbstack on an m2 mac

I’ve had several users of the downstream package tailwindcss-ruby complain about issues that seem like they may be caused by this:

@philipp-spiess tagging you because you were involved in the bun Musl support conversation and may have some insight?

If it’s helpful, so far the users that have reported the issue are on various hardware:

  • Intel Celeron n5105
  • Intel Xeon Skylake - x86_64 (64-bit)
  • Heroku servers (unknown)