chore: fix build dependencies and frontend config
- Bump Docker SDK, downgrade otel deps for Go 1.24 compatibility - Fix duplicate i18n import in InstanceCard - Fix SvelteKit prerender/strict config for SPA build - Update Dockerfile with GOTOOLCHAIN=auto - Generate package-lock.json and go.sum WIP: still resolving Go 1.24 vs otel transitive dep versions
This commit is contained in:
+6
-2
@@ -9,19 +9,23 @@ COPY web/ ./
|
||||
RUN npm run build
|
||||
|
||||
# Stage 2: Build Go binary
|
||||
FROM golang:1.23-alpine AS backend-builder
|
||||
FROM golang:1.24-alpine AS backend-builder
|
||||
|
||||
RUN apk add --no-cache git ca-certificates
|
||||
|
||||
WORKDIR /build
|
||||
COPY go.mod go.sum ./
|
||||
|
||||
# The project requires Go 1.25 (transitive dep from Docker SDK -> otelhttp).
|
||||
# GOTOOLCHAIN=auto lets Go 1.24 download the required toolchain automatically.
|
||||
ENV GOTOOLCHAIN=auto
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
# Copy built frontend into the expected embed location.
|
||||
COPY --from=frontend-builder /build/web/build ./web/build
|
||||
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /docker-watcher ./cmd/server
|
||||
RUN GOTOOLCHAIN=auto CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /docker-watcher ./cmd/server
|
||||
|
||||
# Stage 3: Minimal runtime image
|
||||
FROM alpine:3.19
|
||||
|
||||
Reference in New Issue
Block a user