Skip to content

Commit 5c3b66a

Browse files
feat: update openclaw Dockerfile
1 parent 047ae3e commit 5c3b66a

File tree

6 files changed

+7
-61
lines changed

6 files changed

+7
-61
lines changed

.github/workflows/openclaw-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
curl -fsSL "https://github.com/openclaw/openclaw/archive/refs/tags/v${{ github.event.inputs.openclawTag }}.tar.gz" \
5050
| tar -xz -C _src/openclaw --strip-components=1
5151
mkdir -p _src/openclaw/openclaw
52-
cp openclaw/Dockerfile openclaw/Caddyfile openclaw/docker-entrypoint.sh _src/openclaw/openclaw/
52+
cp openclaw/Dockerfile _src/openclaw/openclaw/
5353
5454
- name: Build OpenClaw Image and Push
5555
uses: docker/build-push-action@v6

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ Current images in this repository:
1717
Key points:
1818

1919
1. It follows official OpenClaw releases and builds from upstream tags
20-
2. It integrates `Caddy` by default to provide HTTPS reverse proxy for OpenClaw
21-
3. It adds an `openclaw` command for easier startup and in-container usage
20+
2. It stays close to the upstream OpenClaw Docker build flow while adding a small set of 1Panel-specific runtime dependencies
21+
3. It includes `clawhub` and a curated default `OPENCLAW_DOCKER_APT_PACKAGES` set for common media and scripting workflows
2222

2323
## Security
2424

2525
Security is one of the main considerations for `1panel/openclaw`.
2626

27-
- HTTPS is provided through bundled `Caddy` instead of exposing the web UI directly over plain HTTP
2827
- The image stays as close as practical to the upstream OpenClaw Docker behavior while keeping only the customizations needed by 1Panel
28+
- It avoids bundling an extra reverse-proxy process inside the image, which keeps the runtime surface smaller and simpler
2929

3030
## Other Images
3131

README_zh.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,13 @@
1717
主要特点:
1818

1919
1. 跟随 OpenClaw 官方版本发布节奏,按 tag 拉取上游源码进行构建
20-
2. 默认集成 `Caddy`,用于为 OpenClaw 提供 HTTPS 反向代理能力
21-
3. 增加 `openclaw` 命令,便于在容器中直接使用 OpenClaw 启动入口
20+
2. 尽量保持与 OpenClaw 上游 Docker 构建流程一致,只保留少量 1Panel 所需的运行时定制
21+
3. 内置 `clawhub`,并提供一组适合常见媒体处理和脚本场景的默认 `OPENCLAW_DOCKER_APT_PACKAGES`
2222

2323
## 安全性
2424

2525
`1panel/openclaw` 的一个重点是安全性。
2626

27-
- 默认通过集成的 `Caddy` 提供 HTTPS 访问入口,避免直接以明文 HTTP 暴露 Web 界面
2827
- 在满足 1Panel 需求的前提下,尽量保持与 OpenClaw 上游 Docker 行为接近
2928

3029
## 其他镜像

openclaw/Caddyfile

Lines changed: 0 additions & 16 deletions
This file was deleted.

openclaw/Dockerfile

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
ARG OPENCLAW_EXTENSIONS=""
1616
ARG OPENCLAW_VARIANT=default
1717
ARG OPENCLAW_DOCKER_APT_UPGRADE=1
18-
ARG OPENCLAW_CADDY_IMAGE="caddy:2"
1918
ARG OPENCLAW_NODE_BOOKWORM_IMAGE="node:24-bookworm@sha256:3a09aa6354567619221ef6c45a5051b671f953f0a1924d1f819ffb236e520e6b"
2019
ARG OPENCLAW_NODE_BOOKWORM_DIGEST="sha256:3a09aa6354567619221ef6c45a5051b671f953f0a1924d1f819ffb236e520e6b"
2120
ARG OPENCLAW_NODE_BOOKWORM_SLIM_IMAGE="node:24-bookworm-slim@sha256:e8e2e91b1378f83c5b2dd15f0247f34110e2fe895f6ca7719dbb780f929368eb"
@@ -38,8 +37,6 @@ RUN mkdir -p /out && \
3837
fi; \
3938
done
4039

41-
FROM ${OPENCLAW_CADDY_IMAGE} AS caddy-binary
42-
4340
FROM ${OPENCLAW_NODE_BOOKWORM_IMAGE} AS build
4441

4542
# Install Bun (required for build scripts). Retry the whole bootstrap flow to
@@ -152,9 +149,6 @@ COPY --from=runtime-assets --chown=node:node /app/openclaw.mjs .
152149
COPY --from=runtime-assets --chown=node:node /app/extensions ./extensions
153150
COPY --from=runtime-assets --chown=node:node /app/skills ./skills
154151
COPY --from=runtime-assets --chown=node:node /app/docs ./docs
155-
COPY --from=caddy-binary /usr/bin/caddy /usr/bin/caddy
156-
COPY openclaw/Caddyfile /etc/caddy/Caddyfile
157-
COPY openclaw/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
158152

159153
# In npm-installed Docker images, prefer the copied source extension tree for
160154
# bundled discovery so package metadata that points at source entries stays valid.
@@ -241,12 +235,8 @@ RUN --mount=type=cache,id=openclaw-bookworm-apt-cache,target=/var/cache/apt,shar
241235
fi
242236

243237
RUN ln -sf /app/openclaw.mjs /usr/local/bin/openclaw && \
244-
install -d -o node -g node /data /config /etc/caddy /tmp/caddy && \
245-
chmod 755 /usr/local/bin/docker-entrypoint.sh /usr/bin/caddy /app/openclaw.mjs && \
246-
chown -R node:node /data /config /etc/caddy /tmp/caddy
238+
chmod 755 /app/openclaw.mjs
247239

248-
ENV CADDY_HTTPS_PORT=8443
249-
ENV CADDY_SITE_ADDRESS=127.0.0.1
250240
ENV NODE_ENV=production
251241

252242
# Security hardening: Run as non-root user
@@ -269,6 +259,4 @@ USER node
269259
HEALTHCHECK --interval=3m --timeout=10s --start-period=15s --retries=3 \
270260
CMD node -e "fetch('http://127.0.0.1:18789/healthz').then((r)=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"
271261

272-
EXPOSE 8443
273-
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
274262
CMD ["node", "openclaw.mjs", "gateway", "--allow-unconfigured"]

openclaw/docker-entrypoint.sh

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)