From fe24b6771b6840029d34ee7f0295cd486c654afe Mon Sep 17 00:00:00 2001 From: Jose Henrique Date: Fri, 13 Mar 2026 22:12:31 -0300 Subject: [PATCH] trying to fix dockerfile --- .gitea/workflows/mindforge-cronjob.yaml | 3 --- mindforge.cronjob/Dockerfile | 12 +++++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/mindforge-cronjob.yaml b/.gitea/workflows/mindforge-cronjob.yaml index 7209fbe..d020221 100644 --- a/.gitea/workflows/mindforge-cronjob.yaml +++ b/.gitea/workflows/mindforge-cronjob.yaml @@ -31,9 +31,6 @@ jobs: -u "${{ env.REGISTRY_USERNAME }}" \ --password-stdin - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 diff --git a/mindforge.cronjob/Dockerfile b/mindforge.cronjob/Dockerfile index d84187a..ac701fb 100644 --- a/mindforge.cronjob/Dockerfile +++ b/mindforge.cronjob/Dockerfile @@ -4,16 +4,18 @@ FROM --platform=$BUILDPLATFORM golang:1.22-alpine AS builder ARG TARGETARCH ARG TARGETOS +# Install CA certificates in the builder (runs natively, no QEMU needed) +RUN apk --no-cache add ca-certificates + WORKDIR /app COPY . . # Build statically for Linux RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o mindforge-cronjob main.go -# Use Alpine for running, with CA certificates for TLS -FROM alpine:latest -WORKDIR /app -RUN apk --no-cache add ca-certificates -COPY --from=builder /app/mindforge-cronjob . +# Use scratch to avoid QEMU: no foreign-arch commands to emulate +FROM scratch +COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ +COPY --from=builder /app/mindforge-cronjob /app/mindforge-cronjob ENV GIT_REPOSITORY="" ENV GEMINI_API_KEY="" ENV OPENAI_API_KEY=""