Picoclaw / Dockerfile
saadpie's picture
Update Dockerfile
cb7b626 verified
Raw
History Blame Contribute Delete
890 Bytes
# Stage 1: Build PicoClaw
FROM golang:1.23-alpine AS builder
# Allows Go to auto-download 1.25.8+ as required by the repo
ENV GOTOOLCHAIN=auto
RUN apk add --no-cache git make gcc musl-dev
WORKDIR /app
RUN git clone https://github.com/sipeed/picoclaw.git .
RUN make build
# Stage 2: Final Environment
FROM python:3.11-slim
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
# Running as root to match your successful Termux environment
WORKDIR /app
# Copy binary explicitly
COPY --from=builder /app/build/picoclaw /app/picoclaw
RUN chmod +x /app/picoclaw
# Create the EXACT structure for root (matches Termux behavior)
RUN mkdir -p /root/.picoclaw/workspace /root/.picoclaw/storage
# Install dependencies
RUN pip install flask
# Copy your local files
COPY config.json /root/.picoclaw/config.json
COPY app.py .
EXPOSE 7860
CMD ["python", "app.py"]