fix dockerfile
This commit is contained in:
@@ -8,9 +8,11 @@ ARG TARGETOS
|
||||
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 main.go
|
||||
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o mindforge-cronjob ./cmd/mindforge.cronjob
|
||||
|
||||
# Use scratch to avoid QEMU: no foreign-arch commands to emulate
|
||||
FROM scratch
|
||||
|
||||
Reference in New Issue
Block a user