fix: ensure dlv binary is verifiable and copied correctly in multi-arch build

This commit is contained in:
Wikid82
2025-11-22 00:23:59 -05:00
parent bc252ebebe
commit 902a09d686
+5 -1
View File
@@ -46,7 +46,10 @@ RUN apk add --no-cache clang lld
RUN xx-apk add --no-cache gcc musl-dev sqlite-dev
# Install Delve (cross-compile for target)
RUN CGO_ENABLED=0 xx-go install github.com/go-delve/delve/cmd/dlv@latest
# Note: xx-go install puts binaries in /go/bin/TARGETOS_TARGETARCH/dlv if cross-compiling
# or just /go/bin/dlv if native. We need to handle this.
RUN CGO_ENABLED=0 xx-go install github.com/go-delve/delve/cmd/dlv@latest && \
xx-verify /go/bin/dlv
# Copy Go module files
COPY backend/go.mod backend/go.sum ./
@@ -105,6 +108,7 @@ COPY --from=caddy-builder /usr/bin/caddy /usr/bin/caddy
# Copy Go binary from backend builder
COPY --from=backend-builder /app/backend/cpmp /app/cpmp
# Copy Delve debugger (xx-go install places it in /go/bin)
COPY --from=backend-builder /go/bin/dlv /usr/local/bin/dlv
# Copy frontend build from frontend builder