madibaalbert commited on
Commit
55eafb8
·
verified ·
1 Parent(s): a0b7660

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -14
Dockerfile CHANGED
@@ -1,22 +1,35 @@
1
- FROM node:22-alpine
2
 
3
- ENV PORT=7860 HOST=0.0.0.0 NODE_ENV=production \
4
- NODE_OPTIONS="--max-old-space-size=2048" \
5
- OPENCLAW_SANDBOX_ENABLED=false \
6
- OPENCLAW_TOOLS_ENABLED=false
 
7
 
8
- RUN apk add --no-cache curl bash tini git
 
 
 
 
 
 
9
 
10
- WORKDIR /app
11
- RUN git clone https://github.com/openclaw/openclaw.git . && \
12
- corepack enable && \
13
- pnpm install --prod --frozen-lockfile --ignore-scripts
14
 
15
- RUN adduser -D -u 1000 node
16
  USER node
17
- COPY entrypoint.sh /app/entrypoint.sh
18
- RUN chmod +x /app/entrypoint.sh
19
 
 
 
 
 
 
 
 
 
20
  EXPOSE 7860
21
- ENTRYPOINT ["/sbin/tini", "--", "/app/entrypoint.sh"]
22
 
 
 
1
+ FROM node:22-bookworm-slim
2
 
3
+ # Configuration de l'environnement
4
+ ENV DEBIAN_FRONTEND=noninteractive
5
+ ENV PORT=7860
6
+ ENV HOST=0.0.0.0
7
+ ENV NODE_ENV=production
8
 
9
+ # Installation des dépendances système
10
+ RUN apt-get update && apt-get install -y \
11
+ git \
12
+ curl \
13
+ ca-certificates \
14
+ procps \
15
+ && rm -rf /var/lib/apt/lists/*
16
 
17
+ # Installation globale de OpenClaw
18
+ RUN npm install -g openclaw@latest
 
 
19
 
20
+ # Configuration utilisateur
21
  USER node
22
+ ENV HOME=/home/node
23
+ WORKDIR $HOME
24
 
25
+ # Préparation des dossiers
26
+ RUN mkdir -p $HOME/.openclaw/{workspace,credentials,agents/main/sessions}
27
+
28
+ # Copie du script d'entrée
29
+ COPY --chown=node:node entrypoint.sh $HOME/entrypoint.sh
30
+ RUN chmod +x $HOME/entrypoint.sh
31
+
32
+ # Exposition du port HF
33
  EXPOSE 7860
 
34
 
35
+ ENTRYPOINT ["/home/node/entrypoint.sh"]