adding dockerfile
This commit is contained in:
23
mindforge.cronjob/Dockerfile
Normal file
23
mindforge.cronjob/Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
# Start from the official Golang image for building
|
||||
FROM --platform=$BUILDPLATFORM golang:1.22-alpine AS builder
|
||||
|
||||
ARG TARGETARCH
|
||||
ARG TARGETOS
|
||||
|
||||
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 .
|
||||
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"]
|
||||
Reference in New Issue
Block a user