forked from jrswab/axe
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (25 loc) · 925 Bytes
/
Dockerfile
File metadata and controls
37 lines (25 loc) · 925 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Build stage
FROM golang:1.24-alpine AS build
WORKDIR /build
COPY go.mod go.sum ./
RUN go mod download
COPY . .
ENV CGO_ENABLED=0
RUN go build -trimpath -ldflags="-s -w" -o /build/axe .
# Runtime stage
FROM alpine:3.21
RUN apk add --no-cache ca-certificates
RUN addgroup -g 10001 axe && \
adduser -u 10001 -G axe -h /home/axe -D axe && \
mkdir -p /home/axe/.config/axe /home/axe/.local/share/axe /tmp/axe && \
chown -R axe:axe /home/axe /tmp/axe
ENV HOME=/home/axe
ENV XDG_CONFIG_HOME=/home/axe/.config
ENV XDG_DATA_HOME=/home/axe/.local/share
COPY --from=build /build/axe /usr/local/bin/axe
LABEL org.opencontainers.image.title="axe"
LABEL org.opencontainers.image.description="Lightweight CLI for running single-purpose LLM agents"
LABEL org.opencontainers.image.source="https://github.com/jrswab/axe"
LABEL org.opencontainers.image.licenses="Apache-2.0"
USER axe
ENTRYPOINT ["/usr/local/bin/axe"]