Skip to content

Commit 3a472b4

Browse files
authored
tailwind docker config (#407)
1 parent 1c07733 commit 3a472b4

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

cmd/template/advanced/files/docker/dockerfile.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM golang:1.24.4-alpine AS build
22
{{- if or (.AdvancedOptions.tailwind) (eq .DBDriver "sqlite") }}
3-
RUN apk add --no-cache{{- if .AdvancedOptions.tailwind }} curl{{ end }}{{- if (eq .DBDriver "sqlite") }} alpine-sdk{{ end }}
3+
RUN apk add --no-cache{{- if .AdvancedOptions.tailwind }} curl libstdc++ libgcc{{ end }}{{- if (eq .DBDriver "sqlite") }} alpine-sdk{{ end }}
44
{{- end }}
55

66
WORKDIR /app
@@ -16,7 +16,7 @@ RUN go install github.com/a-h/templ/cmd/templ@latest && \
1616
{{- end}}
1717

1818
{{- if .AdvancedOptions.tailwind}}
19-
curl -sL https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64 -o tailwindcss && \
19+
curl -sL https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64-musl -o tailwindcss && \
2020
chmod +x tailwindcss && \
2121
./tailwindcss -i cmd/web/styles/input.css -o cmd/web/assets/css/output.css
2222
{{- end }}

docs/docs/advanced-flag/docker.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The Dockerfile includes a two-stage build, and the final config depends on the u
66
```dockerfile
77
FROM golang:1.24.4-alpine AS build
88

9-
RUN apk add --no-cache curl
9+
RUN apk add --no-cache curl libstdc++ libgcc
1010

1111
WORKDIR /app
1212

@@ -15,8 +15,7 @@ RUN go mod download
1515

1616
COPY . .
1717

18-
RUN apk add --no-cache libstdc++ libgcc && \
19-
go install github.com/a-h/templ/cmd/templ@latest && \
18+
RUN go install github.com/a-h/templ/cmd/templ@latest && \
2019
templ generate && \
2120
curl -sL https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64-musl -o tailwindcss && \
2221
chmod +x tailwindcss && \

0 commit comments

Comments
 (0)