fix: quilldrop build in dockerfile
R
Rüdiger Küpper
<rpr@9it.de>
committete am 19.02.2026 01:59
b74c3cfc9a2ceda79c599c6095245ae0853ae9cc
| @@ -1,13 +1,17 @@ | ||
| 1 | -FROM --platform=$TARGETPLATFORM nginx AS builder |
|
| 1 | +FROM --platform=$TARGETPLATFORM golang:1.23-alpine AS quilldrop |
|
| 2 | +WORKDIR /build |
|
| 3 | +COPY go.mod go.sum ./ |
|
| 4 | +RUN go mod download |
|
| 5 | +COPY --exclude=static/images . . |
|
| 6 | +RUN CGO_ENABLED=0 go build -o quilldrop |
|
| 2 | 7 | |
| 8 | +FROM --platform=$TARGETPLATFORM nginx AS builder |
|
| 3 | 9 | WORKDIR /app |
| 4 | - | |
| 10 | +COPY --from=quilldrop /build/quilldrop ./quilldrop |
|
| 5 | 11 | COPY --exclude=static/images . . |
| 6 | - | |
| 7 | 12 | RUN ./quilldrop generate |
| 8 | 13 | |
| 9 | -FROM --platform=$TARGETPLATFORM nginx |
|
| 10 | 14 | |
| 15 | +FROM --platform=$TARGETPLATFORM nginx |
|
| 11 | 16 | COPY --from=builder /app/output /usr/share/nginx/html |
| 12 | - | |
| 13 | 17 | EXPOSE 80 |
| @@ -1,14 +1,18 @@ | ||
| 1 | -.PHONY: serve build docker-static docker-run test clean docker-up docker-down generate-keys migrate |
|
| 1 | +.PHONY: serve build docker-images docker-static docker-run |
|
| 2 | 2 | |
| 3 | +GIT := $(shell git pull --quiet 2>/dev/null || true) |
|
| 3 | 4 | LATEST_TAG := $(shell git tag --sort=-version:refname | head -n 1) |
| 4 | 5 | |
| 6 | +tag: |
|
| 7 | +@echo "Latest tag: $(LATEST_TAG)" |
|
| 8 | + | |
| 5 | 9 | serve: |
| 6 | 10 | go run . serve |
| 7 | 11 | |
| 8 | 12 | generate: |
| 9 | 13 | go run . generate |
| 10 | 14 | |
| 11 | 15 | build: |
| 12 | 16 | GOOS=linux GOARCH=arm64 go build -o quilldrop |
| 13 | 17 | |
| 14 | 18 | docker-static: |