- Add Dockerfile with multi-stage build for picoclaw - Add docker-compose.discord.yml for Discord bot service - Add docker-compose.yml for agent mode service - Add .env.example with environment variable template - Add .dockerignore for optimized builds - Update README.md with Docker Compose section and language switch - Add README.ja.md (Japanese documentation) - Update .gitignore with Docker-related entries
37 lines
950 B
Docker
37 lines
950 B
Docker
# ============================================================
|
|
# Stage 1: Build the picoclaw binary
|
|
# ============================================================
|
|
FROM golang:1.24-alpine AS builder
|
|
|
|
RUN apk add --no-cache git make
|
|
|
|
WORKDIR /src
|
|
|
|
# Cache dependencies
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
# Copy source and build
|
|
COPY . .
|
|
RUN make build
|
|
|
|
# ============================================================
|
|
# Stage 2: Minimal runtime image
|
|
# ============================================================
|
|
FROM alpine:3.21
|
|
|
|
RUN apk add --no-cache ca-certificates tzdata
|
|
|
|
# Copy binary
|
|
COPY --from=builder /src/build/picoclaw /usr/local/bin/picoclaw
|
|
|
|
# Copy builtin skills
|
|
COPY --from=builder /src/skills /opt/picoclaw/skills
|
|
|
|
# Create picoclaw home directory
|
|
RUN mkdir -p /root/.picoclaw/workspace/skills && \
|
|
cp -r /opt/picoclaw/skills/* /root/.picoclaw/workspace/skills/ 2>/dev/null || true
|
|
|
|
ENTRYPOINT ["picoclaw"]
|
|
CMD ["gateway"]
|