add dockerfiler

This commit is contained in:
2026-04-01 15:12:00 +02:00
parent 7292751ef7
commit 7bce56384f
4 changed files with 47 additions and 11 deletions

26
Dockerfile Normal file
View File

@@ -0,0 +1,26 @@
FROM golang:1.24-alpine AS builder
WORKDIR /app
ENV GOTOOLCHAIN=auto
COPY go.mod go.sum ./
RUN go mod download
COPY . ./
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -o /ax .
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /data
COPY --from=builder /ax /app/ax
ENV AX_DB_PATH=/data/.ax.db
EXPOSE 7000
ENTRYPOINT ["/app/ax", "serve"]