-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (21 loc) · 721 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (21 loc) · 721 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
# Build stage
FROM golang:1.25-alpine AS builder
RUN apk add --no-cache git gcc musl-dev
WORKDIR /build
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o forge .
# Runtime stage
FROM alpine:3.21
RUN apk add --no-cache ca-certificates curl tmux bash
# Install agentapi for forge serve
RUN curl -fsSL https://github.com/coder/agentapi/releases/latest/download/agentapi-linux-arm64 -o /usr/local/bin/agentapi && \
chmod +x /usr/local/bin/agentapi || true
COPY --from=builder /build/forge /usr/local/bin/forge
# Default config
ENV FORGE_PORT=3284
ENV FORGE_MODEL=anthropic/claude-sonnet-4-20250514
EXPOSE 3284 8080
ENTRYPOINT ["forge"]
CMD ["version"]