Hi, I’m not exactly sure what’s going on here, but I have two suggestions.
-
Try using
golang:1.23-bullseyeas base image instead of alpine. -
Use a multi-stage build to install tailwind with a node package manager.
FROM node:20-slim AS tailwind-builder
WORKDIR /app
COPY ./package.json ./package-lock.json ./styles.css /app
RUN npm install
RUN npx @tailwindcss/cli -i ./styles.css -o ./styles-compiled.css
FROM golang:1.23-alpine AS builder
COPY --from=tailwind-builder /app/styles-compiled.css /app/styles.css
# ...