my-openclaw / Dockerfile
BillPanda's picture
update
2795af6 verified
# =====================================================
# Core image
# =====================================================
FROM node:22-slim
# =====================================================
# System dependencies
# =====================================================
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 python3-pip \
git openssh-client ca-certificates \
build-essential g++ make \
&& rm -rf /var/lib/apt/lists/*
# =====================================================
# Python deps (HF sync)
# =====================================================
RUN pip3 install --no-cache-dir huggingface_hub --break-system-packages
# =====================================================
# Git protocol compatibility
# =====================================================
RUN update-ca-certificates && \
git config --global http.sslVerify false && \
git config --global url."https://github.com/".insteadOf ssh://git@github.com/
# =====================================================
# OpenClaw core
# =====================================================
RUN npm install -g openclaw@latest --unsafe-perm
# =====================================================
# Runtime defaults (safe even if overridden by platform)
# =====================================================
ENV HOME=/root \
PORT=7860 \
OPENCLAW_GATEWAY_MODE=local
# =====================================================
# Sync engine (HF backup / restore)
# =====================================================
COPY sync.py /usr/local/bin/sync.py
# =====================================================
# Startup script (runtime-only logic)
# =====================================================
COPY start-openclaw.sh /usr/local/bin/start-openclaw
RUN chmod +x /usr/local/bin/start-openclaw
# =====================================================
# Expose & start
# =====================================================
EXPOSE 7860
ENTRYPOINT ["/usr/local/bin/start-openclaw"]