File size: 892 Bytes
f3c1c6e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bcbdae9
 
 
f3c1c6e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
38
39
40
41
42
43
FROM node:22-slim

LABEL description="OpenClaw AI Agent - Deployed on Hugging Face Spaces"

# Install system dependencies
RUN apt-get update && apt-get install -y \
    curl \
    wget \
    git \
    jq \
    ca-certificates \
    openssl \
    && rm -rf /var/lib/apt/lists/*

# Install OpenClaw globally
RUN npm install -g openclaw@latest

# Pre-install Telegram plugin for OpenClaw
RUN openclaw plugins install clawhub:@openclaw/telegram 2>/dev/null; echo "done"

# Create working directory
WORKDIR /app

# Copy all application files
COPY . /app/

# Make entrypoint executable
RUN chmod +x /app/entrypoint.sh

# Create state directory
RUN mkdir -p /app/.openclaw

# HF Spaces uses port 7860
ENV PORT=7860
ENV OPENCLAW_CONFIG_PATH=/app/openclaw.json
ENV OPENCLAW_STATE_DIR=/app/.openclaw

# Expose the HF required port
EXPOSE 7860

# Start the application
ENTRYPOINT ["/app/entrypoint.sh"]