Fix Docker build failure with Tailwind CSS v4

This PR fixes the Docker build failure caused by incompatibility with the new CLI command structure of Tailwind CSS v4. Previously, the build failed with the error: `npm error could not determine executable to run.`

https://github.com/tailwindlabs/tailwindcss/discussions/15820
This commit is contained in:
nyuuzyou 2025-03-27 21:04:13 +00:00
parent 4e3022ce1a
commit 2cb5bcebf3

View File

@ -6,7 +6,7 @@ WORKDIR /src
RUN apk --no-cache add ca-certificates git nodejs npm RUN apk --no-cache add ca-certificates git nodejs npm
COPY . . COPY . .
RUN npx tailwindcss -i static/tailwind.css -o static/app.css -m RUN npx @tailwindcss/cli -i static/tailwind.css -o static/app.css -m
RUN go mod download RUN go mod download
RUN GOOS=linux GOARCH=$TARGETARCH CGO_ENABLED=0 go build -ldflags "-X codeberg.org/rimgo/rimgo/pages.VersionInfo=$(date '+%Y-%m-%d')-$(git rev-list --abbrev-commit -1 HEAD)" RUN GOOS=linux GOARCH=$TARGETARCH CGO_ENABLED=0 go build -ldflags "-X codeberg.org/rimgo/rimgo/pages.VersionInfo=$(date '+%Y-%m-%d')-$(git rev-list --abbrev-commit -1 HEAD)"