From b3145b78a91402b369218a9e95a90b968a0d01c1 Mon Sep 17 00:00:00 2001 From: Jonni Liljamo Date: Thu, 24 Oct 2024 14:32:33 +0300 Subject: [PATCH] fix: templ generate after copy --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 45aba39..443fea7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,11 +11,12 @@ COPY go.mod go.sum ./ RUN go mod download && go mod verify RUN go install github.com/a-h/templ/cmd/templ@$(go list -m -f '{{ .Version }}' github.com/a-h/templ) -RUN templ generate --path internal/components COPY cmd/ ./cmd COPY internal/ ./internal +RUN templ generate --path internal/components + RUN --mount=type=cache,target=/root/.cache/go-build \ CGO_ENABLED=1 GOOS=linux go build -ldflags=-X=main.version=${VERSION} -v -o /felu ./cmd/felu/main.go -- 2.44.1