fix(dockerfile): use correct arch on tailwind css download
This commit is contained in:
parent
ba21c71835
commit
0b59f273a2
1 changed files with 15 additions and 3 deletions
18
Dockerfile
18
Dockerfile
|
|
@ -25,9 +25,21 @@ RUN set -eux; \
|
|||
go install "github.com/a-h/templ/cmd/templ@${TEMPL_VER}"
|
||||
|
||||
# ---- Tailwind v4 standalone ----
|
||||
RUN curl -fsSL -o /usr/local/bin/tailwindcss \
|
||||
"https://github.com/tailwindlabs/tailwindcss/releases/download/${TAILWIND_VERSION}/tailwindcss-linux-x64-musl" \
|
||||
&& chmod +x /usr/local/bin/tailwindcss
|
||||
RUN set -eux; \
|
||||
ARCH="$(uname -m)"; \
|
||||
case "${ARCH}" in \
|
||||
x86_64) TAILWIND_ARCH="x64" ;; \
|
||||
aarch64) TAILWIND_ARCH="arm64" ;; \
|
||||
*) echo "Unsupported architecture: ${ARCH}" && exit 1 ;; \
|
||||
esac; \
|
||||
TAILWIND_URL="https://github.com/tailwindlabs/tailwindcss/releases/download/${TAILWIND_VERSION}/tailwindcss-linux-${TAILWIND_ARCH}-musl"; \
|
||||
echo "Downloading Tailwind CSS for ${ARCH} from ${TAILWIND_URL}"; \
|
||||
curl -fsSL -o /usr/local/bin/tailwindcss "${TAILWIND_URL}"; \
|
||||
# Verify the download is a valid ELF binary \
|
||||
file /usr/local/bin/tailwindcss | grep -q "ELF.*executable" || (echo "Downloaded file is not a valid ELF binary:" && file /usr/local/bin/tailwindcss && exit 1); \
|
||||
chmod +x /usr/local/bin/tailwindcss; \
|
||||
# Test that the binary works \
|
||||
/usr/local/bin/tailwindcss --version
|
||||
|
||||
# App source
|
||||
COPY . .
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue