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
HOST: arm64
Docker image: rust:alpine3.20 - use musl libc
Cargo leptos build loads a wrong tailwindcss binary when building leptos application in the rust:alpine3.20 Docker container (->musl)
Dockerfile:
FROM rust:alpine3.20 AS builder
...
RUN cargo install --locked cargo-leptos
...
# Set compilation environment
ENV LEPTOS_TAILWIND_VERSION=${LEPTOS_TAILWIND_VERSION}
#ENV LEPTOS_SASS_VERSION=${LEPTOS_SASS_VERSION}
ENV LEPTOS_WASM_OPT_VERSION=${LEPTOS_WASM_OPT_VERSION}
ENV WASM_BIND_GEN=${WASM_BIND_GEN}
...
RUN cargo leptos build --release -vv
..
Compilation fails when it start process css files. This example has been run many times and the tailwindcss-linux-arm64 binary has been loaded in the first run.
217.4 Tailwind config: TailwindConfig { input_file: "style/tailwind.css", config_file: "tailwind.config.js", tmp_file: "/app/target/tmp/tailwind.css" }
217.4 Command [tailwindcss] is_force_pin_version: true - Ok("v4.0.0")
217.4 Command [tailwindcss] checking for the latest available version
217.4 Style not configured 217.6 Command [tailwindcss] requested version v4.0.0 is already same or newer than available version v4.0.0 217.6 Command cache dir: /root/.cache/cargo-leptos 217.6 Command installing tailwindcss-v4.0.0 ...
217.6 Install downloading tailwindcss https://github.com/tailwindlabs/tailwindcss/releases/download/v4.0.0/tailwindcss-linux-arm64
218.9 Install decompressing tailwindcss /root/.cache/cargo-leptos/tailwindcss-v4.0.0/tailwindcss-v4.0.0 218.9 Command tailwindcss-v4.0.0 installed.
218.9 Command using tailwindcss v4.0.0 /root/.cache/cargo-leptos/tailwindcss-v4.0.0/tailwindcss-v4.0.0/tailwindcss-linux-arm64
218.9 Error: No such file or directory (os error 2)
In alpine environment builder should load tailwindcss-linux-arm64-musl binary instead of tailwindcss-linux-arm64 (this is linked with a glibc).
Workaround
Install tailwindcss-linux-arm64-musl manually before the cargo leptos build command in a dockerfile.
Dockerfile - image: rust:alpine3.20 image
FROM rust:alpine3.20 AS builder
...
...
# Leptos build loads wrong binary file: tailwindcss-linux-arm64 (linked with glibc)
# Install the correct tailwindcss v4.0.0 binary manually
RUN rm -rf /root/.cache/cargo-leptos/tailwindcss-v4.0.0 && \
curl -LO https://github.com/tailwindlabs/tailwindcss/releases/download/v4.0.0/tailwindcss-linux-arm64-musl && \
chmod +x tailwindcss-linux-arm64-musl && \
mv tailwindcss-linux-arm64-musl /usr/local/bin/tailwindcss
RUN cargo leptos build --release -vv
...
The text was updated successfully, but these errors were encountered:
Cargo leptos build loads wrong tailwindcss (v4.0.0) binary
HOST: arm64
Docker image: rust:alpine3.20 - use musl libc
Cargo leptos build loads a wrong tailwindcss binary when building leptos application in the
rust:alpine3.20
Docker container (->musl)Dockerfile:
Compilation fails when it start process css files. This example has been run many times and the tailwindcss-linux-arm64 binary has been loaded in the first run.
In alpine environment builder should load tailwindcss-linux-arm64-musl binary instead of tailwindcss-linux-arm64 (this is linked with a glibc).
Workaround
Install tailwindcss-linux-arm64-musl manually before the cargo leptos build command in a dockerfile.
Dockerfile - image: rust:alpine3.20 image
The text was updated successfully, but these errors were encountered: