Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Discussion and contributions are welcome:

## Documentation & Tutorial

[Wiki & Document](https://labnow.ai/) | [中文使用指引(含中国网络镜像)](https://labnow-ai.feishu.cn/wiki/wikcn0sBhMtb1KNRSUTettxWstc)
[Wiki & Document](https://doc.labnow.ai/) | [中文使用指引(含中国网络镜像)](https://doc.labnow.ai/zh-CN/)

## Develop and Debug

Expand Down
22 changes: 3 additions & 19 deletions docker_openclaw/demo/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,16 @@ services:
openclaw-gateway:
container_name: svc-openclaw-gateway
hostname: svc-openclaw-gateway
image: "quay.io/labnow0dev/openclaw:latest"
image: "quay.io/labnow/openclaw:latest"
pull_policy: if_not_present
restart: unless-stopped
environment:
- TZ=Asia/Shanghai
- PROFILE_LOCALIZE=aliyun-pub
- OPENCLAW_GATEWAY_TOKEN=openclaw
volumes:
- /data/openclaw:/opt/openclaw/data
ports:
- "${OPENCLAW_GATEWAY_PORT:-18789}:18789"
- "${OPENCLAW_BRIDGE_PORT:-18790}:18790"
init: true

openclaw-cli:
container_name: svc-openclaw-cli
hostname: svc-openclaw-cli
image: "quay.io/labnow0dev/openclaw:latest"
pull_policy: if_not_present
restart: "no"
environment:
- TZ=Asia/Shanghai
- PROFILE_LOCALIZE=aliyun-pub
- BROWSER=echo
volumes:
- /data/openclaw:/opt/openclaw/data
init: true
stdin_open: true
tty: true
entrypoint: ["node", "openclaw.mjs"]
# command: ["tail", "-f", "/dev/null"]
53 changes: 42 additions & 11 deletions docker_openclaw/openclaw.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,59 @@ FROM ${BASE_NAMESPACE:+$BASE_NAMESPACE/}${BASE_IMG}
LABEL maintainer="postmaster@labnow.ai"
ENV NODE_ENV=production
ENV PNPM_HOME=/opt/node/pnpm
ENV PNPM_STORE_DIR=/opt/node/pnpm-store
ENV PNPM_NODE_LINKER=hoisted
ENV PATH="${PNPM_HOME}:${PATH}"
ENV PNPM_STORE=/opt/node/pnpm/store
ENV OPENCLAW_HOME=/opt/openclaw
ENV OPENCLAW_PLUGINS_ROOT=${OPENCLAW_HOME}/plugins
ENV OPENCLAW_CONFIG=${OPENCLAW_HOME}/.openclaw/openclaw.json
ENV PATH="${PNPM_HOME}:${OPENCLAW_HOME}:${PATH}"
ENV HOME=/opt/openclaw

COPY work /opt/openclaw/

RUN set -eux && source /opt/utils/script-setup.sh \
&& chmod +x /opt/openclaw/start-openclaw.sh && ln -sf /opt/openclaw/start-openclaw.sh /usr/local/bin/ \
&& chmod +x /opt/openclaw/*.sh && ln -sf /opt/openclaw/start-openclaw.sh /usr/local/bin/ \
&& mkdir -pv /opt/openclaw/data \
&& ln -sfn /opt/openclaw/data /opt/openclaw/.openclaw \
## curl -fsSL https://openclaw.ai/install.sh | NO_PROMPT=1 bash -s -- --no-onboard --install-method npm \
&& export SHARP_IGNORE_GLOBAL_LIBVIPS=1 \
&& setup_node_pnpm 10 \
&& pnpm config set enable-pre-post-scripts true \
&& pnpm install -g openclaw@latest --ignore-scripts=false \
&& openclaw --version \
## Clean up and display components version information...
&& list_installed_packages && install__clean
&& pnpm config set package-import-method hardlink \
&& pnpm config set node-linker isolated \
&& pnpm config set store-dir $PNPM_STORE \
&& GLOBAL_DIR=$(pnpm root -g | sed 's|/node_modules$||') \
&& mkdir -pv "$GLOBAL_DIR" \
&& echo '{"dependencies":{},"pnpm":{"onlyBuiltDependencies":["@matrix-org/matrix-sdk-crypto-nodejs","koffi","openclaw","protobufjs","sharp"]}}' \
| tee "$GLOBAL_DIR/package.json" \
&& pnpm config list \
&& pnpm install --prod -g --ignore-scripts=false --config.unsafe-perm=true --store-dir "$PNPM_STORE" openclaw@latest \
&& pnpm store prune --store-dir "$PNPM_STORE" && rm -rf "$PNPM_STORE" && install__clean \
&& openclaw --version

RUN set -eux && source /opt/utils/script-utils.sh \
&& source /opt/openclaw/script-setup-openclaw.sh \
&& cd $OPENCLAW_HOME \
&& printf 'packages:\n - "plugins/*"\n' > pnpm-workspace.yaml \
&& printf '{"name":"openclaw-root","version":"1.0.0","private":true}\n' > package.json \
&& PNPM_VER="$(pnpm --version)" \
&& jq --arg ver "$PNPM_VER" \
--argjson deps '["koffi","sharp","openclaw","protobufjs","@matrix-org/matrix-sdk-crypto-nodejs"]' \
'. + {dependencies: {openclaw:"latest"}, packageManager: ("pnpm@" + $ver), pnpm: { onlyBuiltDependencies: $deps } }' package.json > package.tmp.json \
&& mv package.tmp.json package.json \
&& add_plugin "@larksuite/openclaw-lark" "openclaw-lark" \
&& pnpm install --prod \
## clean up
&& pnpm store prune --store-dir "$PNPM_STORE" && rm -rf "$PNPM_STORE" && install__clean \
&& rm -rf ~/.* \
&& ln -sfn /opt/openclaw/data /opt/openclaw/.openclaw \
&& ls -alh ~/

ENV HOME=/opt/openclaw/
ENV XDG_CONFIG_HOME=/opt/openclaw/data
ENV OPENCLAW_HIDE_BANNER=1
WORKDIR /opt/openclaw
VOLUME ["/opt/openclaw/data"]
VOLUME ["/opt/openclaw/data", "/opt/node/pnpm/store"]
EXPOSE 18789 18790
CMD ["sh", "start-openclaw.sh", "gateway", "--allow-unconfigured", "--bind", "${OPENCLAW_GATEWAY_BIND:-lan}", "--port", "${OPENCLAW_GATEWAY_PORT:-18789}"]

CMD start-openclaw.sh gateway --allow-unconfigured \
--bind "${OPENCLAW_GATEWAY_BIND:-lan}" \
--port "${OPENCLAW_GATEWAY_PORT:-18789}"
Loading
Loading