Files
mindforge/mindforge.cronjob/Dockerfile
Jose Henrique 3f4cbfd41d
All checks were successful
Mindforge Cronjob Build and Deploy / Build Mindforge Cronjob Image (push) Successful in 39s
Mindforge Cronjob Build and Deploy / Deploy Mindforge Cronjob (internal) (push) Successful in 44s
fixing docker and deployment instructions
2026-03-14 11:21:45 -03:00

29 lines
849 B
Docker

# Start from the official Golang image for building
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 go.mod go.sum ./
RUN go mod download
COPY . .
# Build statically for Linux
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o mindforge-cronjob ./cmd/mindforge.cronjob
# Use alpine to provide git (QEMU overhead for apk add is minimal)
FROM alpine:latest
RUN apk --no-cache add git ca-certificates openssh-client
COPY --from=builder /app/mindforge-cronjob /app/mindforge-cronjob
ENV GIT_REPOSITORY=""
ENV GEMINI_API_KEY=""
ENV OPENAI_API_KEY=""
ENV DISCORD_WEBHOOK_URL=""
ENV HAVEN_NOTIFY_URL=""
ENV SSH_PRIVATE_KEY=""
ENTRYPOINT ["/app/mindforge-cronjob"]