Files
tasks/Dockerfile
zeekay b695fbbfb2 feat: native multi-arch CI build + embedded SQLite deployment
- GitHub Actions: parallel amd64 + arm64 on self-hosted runners
  (lqd-build-amd64/arm64), multi-arch manifest, push to GAR
- Dockerfile: CGO-enabled Go build with sqlite support
- embedded-sqlite.yaml: file-based WAL persistence at /data/
- Build tags on test utility files to fix production builds
- Removed luxfi/zap local replace, using published v0.2.1
2026-04-17 11:22:28 -07:00

21 lines
708 B
Docker

# syntax=docker/dockerfile:1
FROM golang:1.26-alpine AS build
ARG GITHUB_TOKEN
WORKDIR /go/src/hanzo-tasks
RUN apk add --no-cache gcc musl-dev sqlite-dev git
ENV GOPRIVATE=github.com/luxfi/*,github.com/hanzoai/*
RUN git config --global url."https://${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=1 go build -tags sqlite -o /tasksd ./cmd/tasksd/
FROM alpine:3.21
RUN apk add --no-cache ca-certificates sqlite-libs
COPY --from=build /tasksd /usr/local/bin/tasksd
COPY config/ /etc/tasks/config/
RUN mkdir -p /data
EXPOSE 7233 7243
ENTRYPOINT ["tasksd"]
CMD ["start", "--env", "embedded-sqlite", "--config", "/etc/tasks/config"]