Skip to content

Commit 51fbd7a

Browse files
authored
Fix docker build process (#403)
1 parent 99ce129 commit 51fbd7a

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.23-alpine AS build
1+
FROM golang:1.24.4-alpine AS build
22
{{- if or (.AdvancedOptions.tailwind) (eq .DBDriver "sqlite") }}
33
RUN apk add --no-cache{{- if .AdvancedOptions.tailwind }} curl{{ end }}{{- if (eq .DBDriver "sqlite") }} alpine-sdk{{ end }}
44
{{- end }}

docs/docs/advanced-flag/docker.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The Dockerfile includes a two-stage build, and the final config depends on the u
44
## Dockerfile
55

66
```dockerfile
7-
FROM golang:1.23-alpine AS build
7+
FROM golang:1.24.4-alpine AS build
88

99
RUN apk add --no-cache curl
1010

@@ -15,9 +15,10 @@ RUN go mod download
1515

1616
COPY . .
1717

18-
RUN go install github.com/a-h/templ/cmd/templ@latest && \
18+
RUN apk add --no-cache libstdc++ libgcc && \
19+
go install github.com/a-h/templ/cmd/templ@latest && \
1920
templ generate && \
20-
curl -sL https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64 -o tailwindcss && \
21+
curl -sL https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64-musl -o tailwindcss && \
2122
chmod +x tailwindcss && \
2223
./tailwindcss -i cmd/web/styles/input.css -o cmd/web/assets/css/output.css
2324

@@ -33,7 +34,7 @@ CMD ["./main"]
3334
Docker config if React flag is used:
3435

3536
```dockerfile
36-
FROM golang:1.23-alpine AS build
37+
FROM golang:1.24.4-alpine AS build
3738

3839
WORKDIR /app
3940

docs/docs/advanced-flag/react-vite.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ make docker-run
8787
### Dockerfile
8888

8989
```dockerfile
90-
FROM golang:1.23-alpine AS build
90+
FROM golang:1.24.4-alpine AS build
9191

9292
WORKDIR /app
9393

0 commit comments

Comments
 (0)