惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

大猫的无限游戏
大猫的无限游戏
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园_首页
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
Docker
酷 壳 – CoolShell
酷 壳 – CoolShell
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
美团技术团队
量子位
M
MIT News - Artificial intelligence
Apple Machine Learning Research
Apple Machine Learning Research
阮一峰的网络日志
阮一峰的网络日志
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
腾讯CDC
Hugging Face - Blog
Hugging Face - Blog
博客园 - 【当耐特】
小众软件
小众软件
博客园 - 司徒正美
罗磊的独立博客
云风的 BLOG
云风的 BLOG
B
Blog RSS Feed
博客园 - 聂微东

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
ci: centralize docker build wrapper · openclaw/openclaw@b...
steipete · 2026-04-27 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -2,6 +2,7 @@

22

set -euo pipefail

33
44

ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"

5+

source "$ROOT_DIR/scripts/lib/docker-build.sh"

56

COMPOSE_FILE="$ROOT_DIR/docker-compose.yml"

67

EXTRA_COMPOSE_FILE="$ROOT_DIR/docker-compose.extra.yml"

78

IMAGE_NAME="${OPENCLAW_IMAGE:-openclaw:local}"

@@ -27,7 +28,7 @@ require_cmd() {

2728

run_docker_build() {

2829

# Dockerfile uses BuildKit-only syntax (RUN --mount=type=cache). Force

2930

# BuildKit so hosts defaulting to the legacy builder do not fail.

30-

DOCKER_BUILDKIT=1 docker build "$@"

31+

docker_build_exec "$@"

3132

}

3233
3334

is_truthy_value() {

Original file line numberDiff line numberDiff line change

@@ -39,7 +39,7 @@ RUN apt-get update \\

3939

USER appuser

4040

EOF

4141

echo "Building Docker image: $IMAGE_NAME"

42-

run_logged browser-cdp-snapshot-build docker build -t "$IMAGE_NAME" -f "$build_dir/Dockerfile" "$build_dir"

42+

docker_build_run browser-cdp-snapshot-build -t "$IMAGE_NAME" -f "$build_dir/Dockerfile" "$build_dir"

4343

fi

4444
4545

echo "Starting browser CDP snapshot container..."

Original file line numberDiff line numberDiff line change

@@ -2,7 +2,7 @@

22

set -euo pipefail

33
44

ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"

5-

source "$ROOT_DIR/scripts/lib/docker-e2e-logs.sh"

5+

source "$ROOT_DIR/scripts/lib/docker-build.sh"

66

IMAGE_NAME="${OPENCLAW_QR_SMOKE_IMAGE:-openclaw-qr-smoke}"

77

DOCKER_BUILD_ARGS=()

88

@@ -15,16 +15,11 @@ if [[ "${OPENCLAW_QR_SMOKE_FORCE_INSTALL:-0}" == "1" ]]; then

1515

fi

1616
1717

echo "Building Docker image..."

18-

DOCKER_BUILD_CMD=(docker build)

19-

if ((${#DOCKER_BUILD_ARGS[@]} > 0)); then

20-

DOCKER_BUILD_CMD+=("${DOCKER_BUILD_ARGS[@]}")

21-

fi

22-

DOCKER_BUILD_CMD+=(

23-

-t "$IMAGE_NAME"

24-

-f "$ROOT_DIR/scripts/e2e/Dockerfile.qr-import"

18+

docker_build_run qr-import-build \

19+

"${DOCKER_BUILD_ARGS[@]}" \

20+

-t "$IMAGE_NAME" \

21+

-f "$ROOT_DIR/scripts/e2e/Dockerfile.qr-import" \

2522

"$ROOT_DIR"

26-

)

27-

run_logged qr-import-build "${DOCKER_BUILD_CMD[@]}"

2823
2924

echo "Running qrcode-tui import smoke..."

3025

run_logged qr-import-run docker run --rm -t "$IMAGE_NAME" node -e "import('@vincentkoc/qrcode-tui').then(async (m)=>{process.stdout.write(await m.renderTerminal('qr-smoke',{small:true}))})"

Original file line numberDiff line numberDiff line change

@@ -0,0 +1,40 @@

1+

#!/usr/bin/env bash

2+
3+

DOCKER_BUILD_LIB_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

4+
5+

if ! declare -F run_logged >/dev/null 2>&1; then

6+

source "$DOCKER_BUILD_LIB_DIR/docker-e2e-logs.sh"

7+

fi

8+
9+

docker_build_exec() {

10+

local build_cmd=(docker build)

11+

if [ "${OPENCLAW_DOCKER_BUILD_USE_BUILDX:-0}" = "1" ]; then

12+

build_cmd=(docker buildx build --load)

13+

if [ -n "${OPENCLAW_DOCKER_BUILD_CACHE_FROM:-}" ]; then

14+

build_cmd+=(--cache-from "${OPENCLAW_DOCKER_BUILD_CACHE_FROM}")

15+

fi

16+

if [ -n "${OPENCLAW_DOCKER_BUILD_CACHE_TO:-}" ]; then

17+

build_cmd+=(--cache-to "${OPENCLAW_DOCKER_BUILD_CACHE_TO}")

18+

fi

19+

fi

20+
21+

env DOCKER_BUILDKIT=1 "${build_cmd[@]}" "$@"

22+

}

23+
24+

docker_build_run() {

25+

local label="$1"

26+

shift

27+
28+

local build_cmd=(docker build)

29+

if [ "${OPENCLAW_DOCKER_BUILD_USE_BUILDX:-0}" = "1" ]; then

30+

build_cmd=(docker buildx build --load)

31+

if [ -n "${OPENCLAW_DOCKER_BUILD_CACHE_FROM:-}" ]; then

32+

build_cmd+=(--cache-from "${OPENCLAW_DOCKER_BUILD_CACHE_FROM}")

33+

fi

34+

if [ -n "${OPENCLAW_DOCKER_BUILD_CACHE_TO:-}" ]; then

35+

build_cmd+=(--cache-to "${OPENCLAW_DOCKER_BUILD_CACHE_TO}")

36+

fi

37+

fi

38+
39+

run_logged "$label" env DOCKER_BUILDKIT=1 "${build_cmd[@]}" "$@"

40+

}

Original file line numberDiff line numberDiff line change

@@ -4,6 +4,7 @@ DOCKER_E2E_LIB_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

44

ROOT_DIR="${ROOT_DIR:-$(cd "$DOCKER_E2E_LIB_DIR/../.." && pwd)}"

55
66

source "$DOCKER_E2E_LIB_DIR/docker-e2e-logs.sh"

7+

source "$DOCKER_E2E_LIB_DIR/docker-build.sh"

78
89

docker_e2e_resolve_image() {

910

local default_image="$1"

@@ -48,10 +49,10 @@ docker_e2e_build_or_reuse() {

4849

fi

4950
5051

echo "Building Docker image: $image_name"

51-

local build_cmd=(docker build)

52+

local build_args=()

5253

if [ -n "$target" ]; then

53-

build_cmd+=(--target "$target")

54+

build_args+=(--target "$target")

5455

fi

55-

build_cmd+=(-t "$image_name" -f "$dockerfile" "$context")

56-

run_logged "$label-build" "${build_cmd[@]}"

56+

build_args+=(-t "$image_name" -f "$dockerfile" "$context")

57+

docker_build_run "$label-build" "${build_args[@]}"

5758

}

Original file line numberDiff line numberDiff line change

@@ -1,7 +1,10 @@

11

#!/usr/bin/env bash

22

set -euo pipefail

33
4+

ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"

5+

source "$ROOT_DIR/scripts/lib/docker-build.sh"

6+
47

IMAGE_NAME="openclaw-sandbox-browser:bookworm-slim"

58
6-

docker build -t "${IMAGE_NAME}" -f Dockerfile.sandbox-browser .

9+

docker_build_exec -t "${IMAGE_NAME}" -f "$ROOT_DIR/Dockerfile.sandbox-browser" "$ROOT_DIR"

710

echo "Built ${IMAGE_NAME}"

Original file line numberDiff line numberDiff line change

@@ -1,6 +1,9 @@

11

#!/usr/bin/env bash

22

set -euo pipefail

33
4+

ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"

5+

source "$ROOT_DIR/scripts/lib/docker-build.sh"

6+
47

BASE_IMAGE="${BASE_IMAGE:-openclaw-sandbox:bookworm-slim}"

58

TARGET_IMAGE="${TARGET_IMAGE:-openclaw-sandbox-common:bookworm-slim}"

69

PACKAGES="${PACKAGES:-curl wget jq coreutils grep nodejs npm python3 git ca-certificates golang-go rustc cargo unzip pkg-config libasound2-dev build-essential file}"

@@ -17,25 +20,14 @@ OPENCLAW_DOCKER_BUILD_CACHE_TO="${OPENCLAW_DOCKER_BUILD_CACHE_TO:-}"

1720

if ! docker image inspect "${BASE_IMAGE}" >/dev/null 2>&1; then

1821

echo "Base image missing: ${BASE_IMAGE}"

1922

echo "Building base image via scripts/sandbox-setup.sh..."

20-

scripts/sandbox-setup.sh

23+

"$ROOT_DIR/scripts/sandbox-setup.sh"

2124

fi

2225
2326

echo "Building ${TARGET_IMAGE} with: ${PACKAGES}"

2427
25-

build_cmd=(docker build)

26-

if [ "${OPENCLAW_DOCKER_BUILD_USE_BUILDX}" = "1" ]; then

27-

build_cmd=(docker buildx build --load)

28-

if [ -n "${OPENCLAW_DOCKER_BUILD_CACHE_FROM}" ]; then

29-

build_cmd+=(--cache-from "${OPENCLAW_DOCKER_BUILD_CACHE_FROM}")

30-

fi

31-

if [ -n "${OPENCLAW_DOCKER_BUILD_CACHE_TO}" ]; then

32-

build_cmd+=(--cache-to "${OPENCLAW_DOCKER_BUILD_CACHE_TO}")

33-

fi

34-

fi

35-
36-

"${build_cmd[@]}" \

28+

docker_build_exec \

3729

-t "${TARGET_IMAGE}" \

38-

-f Dockerfile.sandbox-common \

30+

-f "$ROOT_DIR/Dockerfile.sandbox-common" \

3931

--build-arg BASE_IMAGE="${BASE_IMAGE}" \

4032

--build-arg PACKAGES="${PACKAGES}" \

4133

--build-arg INSTALL_PNPM="${INSTALL_PNPM}" \

@@ -44,7 +36,7 @@ fi

4436

--build-arg INSTALL_BREW="${INSTALL_BREW}" \

4537

--build-arg BREW_INSTALL_DIR="${BREW_INSTALL_DIR}" \

4638

--build-arg FINAL_USER="${FINAL_USER}" \

47-

.

39+

"$ROOT_DIR"

4840
4941

cat <<NOTE

5042

Built ${TARGET_IMAGE}.

Original file line numberDiff line numberDiff line change

@@ -1,7 +1,10 @@

11

#!/usr/bin/env bash

22

set -euo pipefail

33
4+

ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"

5+

source "$ROOT_DIR/scripts/lib/docker-build.sh"

6+
47

IMAGE_NAME="openclaw-sandbox:bookworm-slim"

58
6-

docker build -t "${IMAGE_NAME}" -f Dockerfile.sandbox .

9+

docker_build_exec -t "${IMAGE_NAME}" -f "$ROOT_DIR/Dockerfile.sandbox" "$ROOT_DIR"

710

echo "Built ${IMAGE_NAME}"

Original file line numberDiff line numberDiff line change

@@ -2,12 +2,12 @@

22

set -euo pipefail

33
44

ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"

5-

source "$ROOT_DIR/scripts/lib/docker-e2e-logs.sh"

5+

source "$ROOT_DIR/scripts/lib/docker-build.sh"

66

IMAGE_NAME="${OPENCLAW_CLEANUP_SMOKE_IMAGE:-openclaw-cleanup-smoke:local}"

77

PLATFORM="${OPENCLAW_CLEANUP_SMOKE_PLATFORM:-linux/amd64}"

88
99

echo "==> Build image: $IMAGE_NAME"

10-

run_logged cleanup-build docker build \

10+

docker_build_run cleanup-build \

1111

-t "$IMAGE_NAME" \

1212

-f "$ROOT_DIR/scripts/docker/cleanup-smoke/Dockerfile" \

1313

"$ROOT_DIR"

Original file line numberDiff line numberDiff line change

@@ -4,6 +4,7 @@ set -euo pipefail

44

ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"

55

# shellcheck source=./docker/install-sh-common/version-parse.sh

66

source "$ROOT_DIR/scripts/docker/install-sh-common/version-parse.sh"

7+

source "$ROOT_DIR/scripts/lib/docker-build.sh"

78
89

resolve_default_smoke_platform() {

910

local host_os

@@ -358,7 +359,7 @@ if [[ "$SKIP_SMOKE_IMAGE_BUILD" == "1" ]]; then

358359

echo "==> Reuse prebuilt smoke image: $SMOKE_IMAGE"

359360

else

360361

echo "==> Build smoke image (upgrade, root, ${SMOKE_PLATFORM}): $SMOKE_IMAGE"

361-

docker build \

362+

docker_build_run install-smoke-build \

362363

--platform "$SMOKE_PLATFORM" \

363364

-t "$SMOKE_IMAGE" \

364365

-f "$ROOT_DIR/scripts/docker/install-sh-smoke/Dockerfile" \

@@ -441,7 +442,7 @@ else

441442

echo "==> Reuse prebuilt non-root image: $NONROOT_IMAGE"

442443

else

443444

echo "==> Build non-root image (${NONROOT_PLATFORM}): $NONROOT_IMAGE"

444-

docker build \

445+

docker_build_run install-nonroot-build \

445446

--platform "$NONROOT_PLATFORM" \

446447

-t "$NONROOT_IMAGE" \

447448

-f "$ROOT_DIR/scripts/docker/install-sh-nonroot/Dockerfile" \