{"id":156,"date":"2026-03-21T22:47:20","date_gmt":"2026-03-21T14:47:20","guid":{"rendered":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/install-docker\/"},"modified":"2026-03-21T23:23:48","modified_gmt":"2026-03-21T15:23:48","slug":"install-docker","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/install-docker\/","title":{"rendered":"Docker"},"content":{"rendered":"<h1>Docker<\/h1>\n<h1>Docker&#65288;&#21487;&#36873;&#65289;<\/h1>\n<p>Docker &#26159;<strong>&#21487;&#36873;&#30340;<\/strong>&#12290;&#20165;&#24403;&#20320;&#24819;&#35201;&#23481;&#22120;&#21270;&#30340; Gateway &#32593;&#20851;&#25110;&#39564;&#35777; Docker &#27969;&#31243;&#26102;&#25165;&#20351;&#29992;&#23427;&#12290;<\/p>\n<h2>Docker &#36866;&#21512;&#25105;&#21527;&#65311;<\/h2>\n<ul>\n<li><strong>&#26159;<\/strong>&#65306;&#20320;&#24819;&#35201;&#19968;&#20010;&#38548;&#31163;&#30340;&#12289;&#21487;&#20002;&#24323;&#30340; Gateway &#32593;&#20851;&#29615;&#22659;&#65292;&#25110;&#22312;&#27809;&#26377;&#26412;&#22320;&#23433;&#35013;&#30340;&#20027;&#26426;&#19978;&#36816;&#34892; OpenClaw&#12290;<\/li>\n<li><strong>&#21542;<\/strong>&#65306;&#20320;&#22312;&#33258;&#24049;&#30340;&#26426;&#22120;&#19978;&#36816;&#34892;&#65292;&#21482;&#24819;&#35201;&#26368;&#24555;&#30340;&#24320;&#21457;&#24490;&#29615;&#12290;&#35831;&#25913;&#29992;&#27491;&#24120;&#30340;&#23433;&#35013;&#27969;&#31243;&#12290;<\/li>\n<li><strong>&#27801;&#31665;&#27880;&#24847;&#20107;&#39033;<\/strong>&#65306;&#26234;&#33021;&#20307;&#27801;&#31665;&#38548;&#31163;&#20063;&#20351;&#29992; Docker&#65292;&#20294;&#23427;<strong>&#19981;&#38656;&#35201;<\/strong>&#23436;&#25972;&#30340; Gateway &#32593;&#20851;&#22312; Docker &#20013;&#36816;&#34892;&#12290;&#21442;&#38405;<a href=\"\/gateway\/sandboxing\">&#27801;&#31665;&#38548;&#31163;<\/a>&#12290;<\/li>\n<\/ul>\n<p>&#26412;&#25351;&#21335;&#28085;&#30422;&#65306;<\/p>\n<ul>\n<li>&#23481;&#22120;&#21270; Gateway &#32593;&#20851;&#65288;&#23436;&#25972;&#30340; OpenClaw &#22312; Docker &#20013;&#65289;<\/li>\n<li>&#27599;&#20250;&#35805;&#26234;&#33021;&#20307;&#27801;&#31665;&#65288;&#20027;&#26426; Gateway &#32593;&#20851; + Docker &#38548;&#31163;&#30340;&#26234;&#33021;&#20307;&#24037;&#20855;&#65289;<\/li>\n<\/ul>\n<p>&#27801;&#31665;&#38548;&#31163;&#35814;&#24773;&#65306;<a href=\"\/gateway\/sandboxing\">&#27801;&#31665;&#38548;&#31163;<\/a><\/p>\n<h2>&#35201;&#27714;<\/h2>\n<ul>\n<li>Docker Desktop&#65288;&#25110; Docker Engine&#65289;+ Docker Compose v2<\/li>\n<li>&#36275;&#22815;&#30340;&#30913;&#30424;&#31354;&#38388;&#29992;&#20110;&#38236;&#20687; + &#26085;&#24535;<\/li>\n<\/ul>\n<h2>&#23481;&#22120;&#21270; Gateway &#32593;&#20851;&#65288;Docker Compose&#65289;<\/h2>\n<h3>&#24555;&#36895;&#24320;&#22987;&#65288;&#25512;&#33616;&#65289;<\/h3>\n<p>&#20174;&#20179;&#24211;&#26681;&#30446;&#24405;&#65306;<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n.\/docker-setup.sh<\/p>\n<pre><code>\n&#27492;&#33050;&#26412;&#65306;\n\n* &#26500;&#24314; Gateway &#32593;&#20851;&#38236;&#20687;\n* &#36816;&#34892;&#26032;&#25163;&#24341;&#23548;&#21521;&#23548;\n* &#25171;&#21360;&#21487;&#36873;&#30340;&#25552;&#20379;&#21830;&#35774;&#32622;&#25552;&#31034;\n* &#36890;&#36807; Docker Compose &#21551;&#21160; Gateway &#32593;&#20851;\n* &#29983;&#25104; Gateway &#32593;&#20851;&#20196;&#29260;&#24182;&#20889;&#20837; `.env`\n\n&#21487;&#36873;&#29615;&#22659;&#21464;&#37327;&#65306;\n\n* `OPENCLAW_DOCKER_APT_PACKAGES` &mdash; &#22312;&#26500;&#24314;&#26399;&#38388;&#23433;&#35013;&#39069;&#22806;&#30340; apt &#21253;\n* `OPENCLAW_EXTRA_MOUNTS` &mdash; &#28155;&#21152;&#39069;&#22806;&#30340;&#20027;&#26426;&#32465;&#23450;&#25346;&#36733;\n* `OPENCLAW_HOME_VOLUME` &mdash; &#22312;&#21629;&#21517;&#21367;&#20013;&#25345;&#20037;&#21270; `\/home\/node`\n\n&#23436;&#25104;&#21518;&#65306;\n\n* &#22312;&#27983;&#35272;&#22120;&#20013;&#25171;&#24320; `http:\/\/127.0.0.1:18789\/`&#12290;\n* &#23558;&#20196;&#29260;&#31896;&#36148;&#21040;&#25511;&#21046; UI&#65288;&#35774;&#32622; &rarr; token&#65289;&#12290;\n* &#38656;&#35201;&#20877;&#27425;&#33719;&#21462;&#24102;&#20196;&#29260;&#30340; URL&#65311;&#36816;&#34892; `docker compose run --rm openclaw-cli dashboard --no-open`&#12290;\n\n&#23427;&#22312;&#20027;&#26426;&#19978;&#20889;&#20837;&#37197;&#32622;\/&#24037;&#20316;&#21306;&#65306;\n\n* `~\/.openclaw\/`\n* `~\/.openclaw\/workspace`\n\n&#22312; VPS &#19978;&#36816;&#34892;&#65311;&#21442;&#38405; [Hetzner&#65288;Docker VPS&#65289;](\/install\/hetzner)&#12290;\n\n### &#25163;&#21160;&#27969;&#31243;&#65288;compose&#65289;\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\ndocker build -t openclaw:local -f Dockerfile .\ndocker compose run --rm openclaw-cli onboard\ndocker compose up -d openclaw-gateway\n<\/code><\/pre>\n<p>&#27880;&#24847;&#65306;&#20174;&#20179;&#24211;&#26681;&#30446;&#24405;&#36816;&#34892; <code>docker compose ...<\/code>&#12290;&#22914;&#26524;&#20320;&#21551;&#29992;&#20102; <code>OPENCLAW_EXTRA_MOUNTS<\/code> &#25110; <code>OPENCLAW_HOME_VOLUME<\/code>&#65292;&#35774;&#32622;&#33050;&#26412;&#20250;&#20889;&#20837; <code>docker-compose.extra.yml<\/code>&#65307;&#22312;&#20854;&#20182;&#22320;&#26041;&#36816;&#34892; Compose &#26102;&#21253;&#21547;&#23427;&#65306;<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\ndocker compose -f docker-compose.yml -f docker-compose.extra.yml <\/p>\n<pre><code>\n### &#25511;&#21046; UI &#20196;&#29260; + &#37197;&#23545;&#65288;Docker&#65289;\n\n&#22914;&#26524;&#20320;&#30475;&#21040;\"unauthorized\"&#25110;\"disconnected (1008): pairing required\"&#65292;&#33719;&#21462;&#26032;&#30340;&#20202;&#34920;&#26495;&#38142;&#25509;&#24182;&#25209;&#20934;&#27983;&#35272;&#22120;&#35774;&#22791;&#65306;\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\ndocker compose run --rm openclaw-cli dashboard --no-open\ndocker compose run --rm openclaw-cli devices list\ndocker compose run --rm openclaw-cli devices approve &lt;requestId&gt;\n<\/code><\/pre>\n<p>&#26356;&#22810;&#35814;&#24773;&#65306;<a href=\"\/web\/dashboard\">&#20202;&#34920;&#26495;<\/a>&#65292;<a href=\"\/cli\/devices\">&#35774;&#22791;<\/a>&#12290;<\/p>\n<h3>&#39069;&#22806;&#25346;&#36733;&#65288;&#21487;&#36873;&#65289;<\/h3>\n<p>&#22914;&#26524;&#20320;&#24819;&#23558;&#39069;&#22806;&#30340;&#20027;&#26426;&#30446;&#24405;&#25346;&#36733;&#21040;&#23481;&#22120;&#20013;&#65292;&#22312;&#36816;&#34892; <code>docker-setup.sh<\/code> &#20043;&#21069;&#35774;&#32622; <code>OPENCLAW_EXTRA_MOUNTS<\/code>&#12290;&#36825;&#25509;&#21463;&#36887;&#21495;&#20998;&#38548;&#30340; Docker &#32465;&#23450;&#25346;&#36733;&#21015;&#34920;&#65292;&#24182;&#36890;&#36807;&#29983;&#25104; <code>docker-compose.extra.yml<\/code> &#23558;&#23427;&#20204;&#24212;&#29992;&#21040; <code>openclaw-gateway<\/code> &#21644; <code>openclaw-cli<\/code>&#12290;<\/p>\n<p>&#31034;&#20363;&#65306;<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nexport OPENCLAW_EXTRA_MOUNTS=&#8221;$HOME\/.codex:\/home\/node\/.codex:ro,$HOME\/github:\/home\/node\/github:rw&#8221;<br \/>\n.\/docker-setup.sh<\/p>\n<pre><code>\n&#27880;&#24847;&#65306;\n\n* &#36335;&#24452;&#24517;&#39035;&#22312; macOS\/Windows &#19978;&#19982; Docker Desktop &#20849;&#20139;&#12290;\n* &#22914;&#26524;&#20320;&#32534;&#36753; `OPENCLAW_EXTRA_MOUNTS`&#65292;&#37325;&#26032;&#36816;&#34892; `docker-setup.sh` &#20197;&#37325;&#26032;&#29983;&#25104;&#39069;&#22806;&#30340; compose &#25991;&#20214;&#12290;\n* `docker-compose.extra.yml` &#26159;&#29983;&#25104;&#30340;&#12290;&#19981;&#35201;&#25163;&#21160;&#32534;&#36753;&#23427;&#12290;\n\n### &#25345;&#20037;&#21270;&#25972;&#20010;&#23481;&#22120; home&#65288;&#21487;&#36873;&#65289;\n\n&#22914;&#26524;&#20320;&#24819;&#35753; `\/home\/node` &#22312;&#23481;&#22120;&#37325;&#24314;&#21518;&#25345;&#20037;&#21270;&#65292;&#36890;&#36807; `OPENCLAW_HOME_VOLUME` &#35774;&#32622;&#19968;&#20010;&#21629;&#21517;&#21367;&#12290;&#36825;&#20250;&#21019;&#24314;&#19968;&#20010; Docker &#21367;&#24182;&#23558;&#20854;&#25346;&#36733;&#21040; `\/home\/node`&#65292;&#21516;&#26102;&#20445;&#25345;&#26631;&#20934;&#30340;&#37197;&#32622;\/&#24037;&#20316;&#21306;&#32465;&#23450;&#25346;&#36733;&#12290;&#36825;&#37324;&#20351;&#29992;&#21629;&#21517;&#21367;&#65288;&#19981;&#26159;&#32465;&#23450;&#36335;&#24452;&#65289;&#65307;&#23545;&#20110;&#32465;&#23450;&#25346;&#36733;&#65292;&#20351;&#29992; `OPENCLAW_EXTRA_MOUNTS`&#12290;\n\n&#31034;&#20363;&#65306;\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\nexport OPENCLAW_HOME_VOLUME=\"openclaw_home\"\n.\/docker-setup.sh\n<\/code><\/pre>\n<p>&#20320;&#21487;&#20197;&#23558;&#20854;&#19982;&#39069;&#22806;&#25346;&#36733;&#32467;&#21512;&#20351;&#29992;&#65306;<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nexport OPENCLAW_HOME_VOLUME=&#8221;openclaw_home&#8221;<br \/>\nexport OPENCLAW_EXTRA_MOUNTS=&#8221;$HOME\/.codex:\/home\/node\/.codex:ro,$HOME\/github:\/home\/node\/github:rw&#8221;<br \/>\n.\/docker-setup.sh<\/p>\n<pre><code>\n&#27880;&#24847;&#65306;\n\n* &#22914;&#26524;&#20320;&#26356;&#25913; `OPENCLAW_HOME_VOLUME`&#65292;&#37325;&#26032;&#36816;&#34892; `docker-setup.sh` &#20197;&#37325;&#26032;&#29983;&#25104;&#39069;&#22806;&#30340; compose &#25991;&#20214;&#12290;\n* &#21629;&#21517;&#21367;&#20250;&#25345;&#20037;&#21270;&#30452;&#21040;&#20351;&#29992; `docker volume rm &lt;name&gt;` &#21024;&#38500;&#12290;\n\n### &#23433;&#35013;&#39069;&#22806;&#30340; apt &#21253;&#65288;&#21487;&#36873;&#65289;\n\n&#22914;&#26524;&#20320;&#38656;&#35201;&#38236;&#20687;&#20869;&#30340;&#31995;&#32479;&#21253;&#65288;&#20363;&#22914;&#26500;&#24314;&#24037;&#20855;&#25110;&#23186;&#20307;&#24211;&#65289;&#65292;&#22312;&#36816;&#34892; `docker-setup.sh` &#20043;&#21069;&#35774;&#32622; `OPENCLAW_DOCKER_APT_PACKAGES`&#12290;&#36825;&#20250;&#22312;&#38236;&#20687;&#26500;&#24314;&#26399;&#38388;&#23433;&#35013;&#21253;&#65292;&#22240;&#27492;&#21363;&#20351;&#23481;&#22120;&#34987;&#21024;&#38500;&#23427;&#20204;&#20063;&#20250;&#25345;&#20037;&#21270;&#12290;\n\n&#31034;&#20363;&#65306;\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\nexport OPENCLAW_DOCKER_APT_PACKAGES=\"ffmpeg build-essential\"\n.\/docker-setup.sh\n<\/code><\/pre>\n<p>&#27880;&#24847;&#65306;<\/p>\n<ul>\n<li>&#36825;&#25509;&#21463;&#31354;&#26684;&#20998;&#38548;&#30340; apt &#21253;&#21517;&#31216;&#21015;&#34920;&#12290;<\/li>\n<li>&#22914;&#26524;&#20320;&#26356;&#25913; <code>OPENCLAW_DOCKER_APT_PACKAGES<\/code>&#65292;&#37325;&#26032;&#36816;&#34892; <code>docker-setup.sh<\/code> &#20197;&#37325;&#24314;&#38236;&#20687;&#12290;<\/li>\n<\/ul>\n<h3>&#39640;&#32423;&#29992;&#25143;\/&#21151;&#33021;&#23436;&#25972;&#30340;&#23481;&#22120;&#65288;&#36873;&#25321;&#21152;&#20837;&#65289;<\/h3>\n<p>&#40664;&#35748;&#30340; Docker &#38236;&#20687;&#26159;<strong>&#23433;&#20840;&#20248;&#20808;<\/strong>&#30340;&#65292;&#20197;&#38750; root &#30340; <code>node<\/code> &#29992;&#25143;&#36816;&#34892;&#12290;&#36825;&#20445;&#25345;&#20102;&#36739;&#23567;&#30340;&#25915;&#20987;&#38754;&#65292;&#20294;&#36825;&#24847;&#21619;&#30528;&#65306;<\/p>\n<ul>\n<li>&#36816;&#34892;&#26102;&#26080;&#27861;&#23433;&#35013;&#31995;&#32479;&#21253;<\/li>\n<li>&#40664;&#35748;&#27809;&#26377; Homebrew<\/li>\n<li>&#27809;&#26377;&#25414;&#32465;&#30340; Chromium\/Playwright &#27983;&#35272;&#22120;<\/li>\n<\/ul>\n<p>&#22914;&#26524;&#20320;&#24819;&#35201;&#21151;&#33021;&#26356;&#23436;&#25972;&#30340;&#23481;&#22120;&#65292;&#20351;&#29992;&#36825;&#20123;&#36873;&#25321;&#21152;&#20837;&#36873;&#39033;&#65306;<\/p>\n<ol>\n<li><strong>&#25345;&#20037;&#21270; <code>\/home\/node<\/code><\/strong> &#20197;&#20415;&#27983;&#35272;&#22120;&#19979;&#36733;&#21644;&#24037;&#20855;&#32531;&#23384;&#33021;&#22815;&#20445;&#30041;&#65306;<\/li>\n<\/ol>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nexport OPENCLAW_HOME_VOLUME=&#8221;openclaw_home&#8221;<br \/>\n.\/docker-setup.sh<\/p>\n<pre><code>\n2. **&#23558;&#31995;&#32479;&#20381;&#36182;&#28888;&#28953;&#21040;&#38236;&#20687;&#20013;**&#65288;&#21487;&#37325;&#22797; + &#25345;&#20037;&#21270;&#65289;&#65306;\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\nexport OPENCLAW_DOCKER_APT_PACKAGES=\"git curl jq\"\n.\/docker-setup.sh\n<\/code><\/pre>\n<ol start=\"3\">\n<li><strong>&#19981;&#20351;&#29992; <code>npx<\/code> &#23433;&#35013; Playwright &#27983;&#35272;&#22120;<\/strong>&#65288;&#36991;&#20813; npm &#35206;&#30422;&#20914;&#31361;&#65289;&#65306;<\/li>\n<\/ol>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\ndocker compose run &#8211;rm openclaw-cli<br \/>\n  node \/app\/node_modules\/playwright-core\/cli.js install chromium<\/p>\n<pre><code>\n&#22914;&#26524;&#20320;&#38656;&#35201; Playwright &#23433;&#35013;&#31995;&#32479;&#20381;&#36182;&#65292;&#20351;&#29992; `OPENCLAW_DOCKER_APT_PACKAGES` &#37325;&#24314;&#38236;&#20687;&#65292;&#32780;&#19981;&#26159;&#22312;&#36816;&#34892;&#26102;&#20351;&#29992; `--with-deps`&#12290;\n\n4. **&#25345;&#20037;&#21270; Playwright &#27983;&#35272;&#22120;&#19979;&#36733;**&#65306;\n\n* &#22312; `docker-compose.yml` &#20013;&#35774;&#32622; `PLAYWRIGHT_BROWSERS_PATH=\/home\/node\/.cache\/ms-playwright`&#12290;\n* &#30830;&#20445; `\/home\/node` &#36890;&#36807; `OPENCLAW_HOME_VOLUME` &#25345;&#20037;&#21270;&#65292;&#25110;&#36890;&#36807; `OPENCLAW_EXTRA_MOUNTS` &#25346;&#36733; `\/home\/node\/.cache\/ms-playwright`&#12290;\n\n### &#26435;&#38480; + EACCES\n\n&#38236;&#20687;&#20197; `node`&#65288;uid 1000&#65289;&#36816;&#34892;&#12290;&#22914;&#26524;&#20320;&#22312; `\/home\/node\/.openclaw` &#19978;&#30475;&#21040;&#26435;&#38480;&#38169;&#35823;&#65292;&#30830;&#20445;&#20320;&#30340;&#20027;&#26426;&#32465;&#23450;&#25346;&#36733;&#30001; uid 1000 &#25317;&#26377;&#12290;\n\n&#31034;&#20363;&#65288;Linux &#20027;&#26426;&#65289;&#65306;\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\nsudo chown -R 1000:1000 \/path\/to\/openclaw-config \/path\/to\/openclaw-workspace\n<\/code><\/pre>\n<p>&#22914;&#26524;&#20320;&#36873;&#25321;&#20197; root &#36816;&#34892;&#20197;&#26041;&#20415;&#20351;&#29992;&#65292;&#20320;&#25509;&#21463;&#20102;&#23433;&#20840;&#26435;&#34913;&#12290;<\/p>\n<h3>&#26356;&#24555;&#30340;&#37325;&#24314;&#65288;&#25512;&#33616;&#65289;<\/h3>\n<p>&#35201;&#21152;&#36895;&#37325;&#24314;&#65292;&#25490;&#24207;&#20320;&#30340; Dockerfile &#20197;&#20415;&#20381;&#36182;&#23618;&#34987;&#32531;&#23384;&#12290;&#36825;&#36991;&#20813;&#20102;&#38500;&#38750;&#38145;&#25991;&#20214;&#26356;&#25913;&#21542;&#21017;&#37325;&#26032;&#36816;&#34892; <code>pnpm install<\/code>&#65306;<\/p>\n<p>&#8220;`dockerfile  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nFROM node:22-bookworm<\/p>\n<h1>&#23433;&#35013; Bun&#65288;&#26500;&#24314;&#33050;&#26412;&#38656;&#35201;&#65289;<\/h1>\n<p>RUN curl -fsSL https:\/\/bun.sh\/install | bash<br \/>\nENV PATH=&#8221;\/root\/.bun\/bin:${PATH}&#8221;<\/p>\n<p>RUN corepack enable<\/p>\n<p>WORKDIR \/app<\/p>\n<h1>&#32531;&#23384;&#20381;&#36182;&#65292;&#38500;&#38750;&#21253;&#20803;&#25968;&#25454;&#26356;&#25913;<\/h1>\n<p>COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc .\/<br \/>\nCOPY ui\/package.json .\/ui\/package.json<br \/>\nCOPY scripts .\/scripts<\/p>\n<p>RUN pnpm install &#8211;frozen-lockfile<\/p>\n<p>COPY . .<br \/>\nRUN pnpm build<br \/>\nRUN pnpm ui:install<br \/>\nRUN pnpm ui:build<\/p>\n<p>ENV NODE_ENV=production<\/p>\n<p>CMD [&#8220;node&#8221;,&#8221;dist\/index.js&#8221;]<\/p>\n<pre><code>\n### &#28192;&#36947;&#35774;&#32622;&#65288;&#21487;&#36873;&#65289;\n\n&#20351;&#29992; CLI &#23481;&#22120;&#37197;&#32622;&#28192;&#36947;&#65292;&#28982;&#21518;&#22312;&#38656;&#35201;&#26102;&#37325;&#21551; Gateway &#32593;&#20851;&#12290;\n\nWhatsApp&#65288;QR&#65289;&#65306;\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\ndocker compose run --rm openclaw-cli channels login\n<\/code><\/pre>\n<p>Telegram&#65288;bot token&#65289;&#65306;<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\ndocker compose run &#8211;rm openclaw-cli channels add &#8211;channel telegram &#8211;token &#8220;&#8221;<\/p>\n<pre><code>\nDiscord&#65288;bot token&#65289;&#65306;\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\ndocker compose run --rm openclaw-cli channels add --channel discord --token \"&lt;token&gt;\"\n<\/code><\/pre>\n<p>&#25991;&#26723;&#65306;<a href=\"\/channels\/whatsapp\">WhatsApp<\/a>&#65292;<a href=\"\/channels\/telegram\">Telegram<\/a>&#65292;<a href=\"\/channels\/discord\">Discord<\/a><\/p>\n<h3>OpenAI Codex OAuth&#65288;&#26080;&#22836; Docker&#65289;<\/h3>\n<p>&#22914;&#26524;&#20320;&#22312;&#21521;&#23548;&#20013;&#36873;&#25321; OpenAI Codex OAuth&#65292;&#23427;&#20250;&#25171;&#24320;&#27983;&#35272;&#22120; URL &#24182;&#23581;&#35797;&#22312; <code>http:\/\/127.0.0.1:1455\/auth\/callback<\/code> &#25429;&#33719;&#22238;&#35843;&#12290;&#22312; Docker &#25110;&#26080;&#22836;&#35774;&#32622;&#20013;&#65292;&#35813;&#22238;&#35843;&#21487;&#33021;&#26174;&#31034;&#27983;&#35272;&#22120;&#38169;&#35823;&#12290;&#22797;&#21046;&#20320;&#21040;&#36798;&#30340;&#23436;&#25972;&#37325;&#23450;&#21521; URL &#24182;&#23558;&#20854;&#31896;&#36148;&#22238;&#21521;&#23548;&#20197;&#23436;&#25104;&#35748;&#35777;&#12290;<\/p>\n<h3>&#20581;&#24247;&#26816;&#26597;<\/h3>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\ndocker compose exec openclaw-gateway node dist\/index.js health &#8211;token &#8220;$OPENCLAW_GATEWAY_TOKEN&#8221;<\/p>\n<pre><code>\n### E2E &#20882;&#28895;&#27979;&#35797;&#65288;Docker&#65289;\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\nscripts\/e2e\/onboard-docker.sh\n<\/code><\/pre>\n<h3>QR &#23548;&#20837;&#20882;&#28895;&#27979;&#35797;&#65288;Docker&#65289;<\/h3>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\npnpm test:docker:qr<\/p>\n<pre><code>\n### &#27880;&#24847;\n\n* Gateway &#32593;&#20851;&#32465;&#23450;&#40664;&#35748;&#20026; `lan` &#29992;&#20110;&#23481;&#22120;&#20351;&#29992;&#12290;\n* Dockerfile CMD &#20351;&#29992; `--allow-unconfigured`&#65307;&#25346;&#36733;&#30340;&#37197;&#32622;&#22914;&#26524; `gateway.mode` &#19981;&#26159; `local` &#20173;&#20250;&#21551;&#21160;&#12290;&#35206;&#30422; CMD &#20197;&#24378;&#21046;&#25191;&#34892;&#26816;&#26597;&#12290;\n* Gateway &#32593;&#20851;&#23481;&#22120;&#26159;&#20250;&#35805;&#30340;&#30495;&#23454;&#26469;&#28304;&#65288;`~\/.openclaw\/agents\/&lt;agentId&gt;\/sessions\/`&#65289;&#12290;\n\n## &#26234;&#33021;&#20307;&#27801;&#31665;&#65288;&#20027;&#26426; Gateway &#32593;&#20851; + Docker &#24037;&#20855;&#65289;\n\n&#28145;&#20837;&#20102;&#35299;&#65306;[&#27801;&#31665;&#38548;&#31163;](\/gateway\/sandboxing)\n\n### &#23427;&#20570;&#20160;&#20040;\n\n&#24403;&#21551;&#29992; `agents.defaults.sandbox` &#26102;&#65292;**&#38750;&#20027;&#20250;&#35805;**&#22312; Docker &#23481;&#22120;&#20869;&#36816;&#34892;&#24037;&#20855;&#12290;Gateway &#32593;&#20851;&#20445;&#25345;&#22312;&#20320;&#30340;&#20027;&#26426;&#19978;&#65292;&#20294;&#24037;&#20855;&#25191;&#34892;&#26159;&#38548;&#31163;&#30340;&#65306;\n\n* scope&#65306;&#40664;&#35748;&#20026; `\"agent\"`&#65288;&#27599;&#20010;&#26234;&#33021;&#20307;&#19968;&#20010;&#23481;&#22120; + &#24037;&#20316;&#21306;&#65289;\n* scope&#65306;`\"session\"` &#29992;&#20110;&#27599;&#20250;&#35805;&#38548;&#31163;\n* &#27599;&#20316;&#29992;&#22495;&#24037;&#20316;&#21306;&#25991;&#20214;&#22841;&#25346;&#36733;&#22312; `\/workspace`\n* &#21487;&#36873;&#30340;&#26234;&#33021;&#20307;&#24037;&#20316;&#21306;&#35775;&#38382;&#65288;`agents.defaults.sandbox.workspaceAccess`&#65289;\n* &#20801;&#35768;\/&#25298;&#32477;&#24037;&#20855;&#31574;&#30053;&#65288;&#25298;&#32477;&#20248;&#20808;&#65289;\n* &#20837;&#31449;&#23186;&#20307;&#34987;&#22797;&#21046;&#21040;&#27963;&#21160;&#27801;&#31665;&#24037;&#20316;&#21306;&#65288;`media\/inbound\/*`&#65289;&#65292;&#20197;&#20415;&#24037;&#20855;&#21487;&#20197;&#35835;&#21462;&#23427;&#65288;&#20351;&#29992; `workspaceAccess: \"rw\"` &#26102;&#65292;&#36825;&#20250;&#33853;&#22312;&#26234;&#33021;&#20307;&#24037;&#20316;&#21306;&#20013;&#65289;\n\n&#35686;&#21578;&#65306;`scope: \"shared\"` &#31105;&#29992;&#36328;&#20250;&#35805;&#38548;&#31163;&#12290;&#25152;&#26377;&#20250;&#35805;&#20849;&#20139;&#19968;&#20010;&#23481;&#22120;&#21644;&#19968;&#20010;&#24037;&#20316;&#21306;&#12290;\n\n### &#27599;&#26234;&#33021;&#20307;&#27801;&#31665;&#37197;&#32622;&#25991;&#20214;&#65288;&#22810;&#26234;&#33021;&#20307;&#65289;\n\n&#22914;&#26524;&#20320;&#20351;&#29992;&#22810;&#26234;&#33021;&#20307;&#36335;&#30001;&#65292;&#27599;&#20010;&#26234;&#33021;&#20307;&#21487;&#20197;&#35206;&#30422;&#27801;&#31665; + &#24037;&#20855;&#35774;&#32622;&#65306;`agents.list[].sandbox` &#21644; `agents.list[].tools`&#65288;&#21152;&#19978; `agents.list[].tools.sandbox.tools`&#65289;&#12290;&#36825;&#35753;&#20320;&#21487;&#20197;&#22312;&#19968;&#20010; Gateway &#32593;&#20851;&#20013;&#36816;&#34892;&#28151;&#21512;&#35775;&#38382;&#32423;&#21035;&#65306;\n\n* &#23436;&#20840;&#35775;&#38382;&#65288;&#20010;&#20154;&#26234;&#33021;&#20307;&#65289;\n* &#21482;&#35835;&#24037;&#20855; + &#21482;&#35835;&#24037;&#20316;&#21306;&#65288;&#23478;&#24237;\/&#24037;&#20316;&#26234;&#33021;&#20307;&#65289;\n* &#26080;&#25991;&#20214;&#31995;&#32479;\/shell &#24037;&#20855;&#65288;&#20844;&#20849;&#26234;&#33021;&#20307;&#65289;\n\n&#21442;&#38405;[&#22810;&#26234;&#33021;&#20307;&#27801;&#31665;&#19982;&#24037;&#20855;](\/tools\/multi-agent-sandbox-tools)&#20102;&#35299;&#31034;&#20363;&#12289;&#20248;&#20808;&#32423;&#21644;&#25925;&#38556;&#25490;&#38500;&#12290;\n\n### &#40664;&#35748;&#34892;&#20026;\n\n* &#38236;&#20687;&#65306;`openclaw-sandbox:bookworm-slim`\n* &#27599;&#20010;&#26234;&#33021;&#20307;&#19968;&#20010;&#23481;&#22120;\n* &#26234;&#33021;&#20307;&#24037;&#20316;&#21306;&#35775;&#38382;&#65306;`workspaceAccess: \"none\"`&#65288;&#40664;&#35748;&#65289;&#20351;&#29992; `~\/.openclaw\/sandboxes`\n  * `\"ro\"` &#20445;&#25345;&#27801;&#31665;&#24037;&#20316;&#21306;&#22312; `\/workspace` &#24182;&#23558;&#26234;&#33021;&#20307;&#24037;&#20316;&#21306;&#21482;&#35835;&#25346;&#36733;&#22312; `\/agent`&#65288;&#31105;&#29992; `write`\/`edit`\/`apply_patch`&#65289;\n  * `\"rw\"` &#23558;&#26234;&#33021;&#20307;&#24037;&#20316;&#21306;&#35835;&#20889;&#25346;&#36733;&#22312; `\/workspace`\n* &#33258;&#21160;&#28165;&#29702;&#65306;&#31354;&#38386; &gt; 24h &#25110; &#24180;&#40836; &gt; 7d\n* &#32593;&#32476;&#65306;&#40664;&#35748;&#20026; `none`&#65288;&#22914;&#26524;&#38656;&#35201;&#20986;&#31449;&#21017;&#26126;&#30830;&#36873;&#25321;&#21152;&#20837;&#65289;\n* &#40664;&#35748;&#20801;&#35768;&#65306;`exec`&#12289;`process`&#12289;`read`&#12289;`write`&#12289;`edit`&#12289;`sessions_list`&#12289;`sessions_history`&#12289;`sessions_send`&#12289;`sessions_spawn`&#12289;`session_status`\n* &#40664;&#35748;&#25298;&#32477;&#65306;`browser`&#12289;`canvas`&#12289;`nodes`&#12289;`cron`&#12289;`discord`&#12289;`gateway`\n\n### &#21551;&#29992;&#27801;&#31665;&#38548;&#31163;\n\n&#22914;&#26524;&#20320;&#35745;&#21010;&#22312; `setupCommand` &#20013;&#23433;&#35013;&#21253;&#65292;&#35831;&#27880;&#24847;&#65306;\n\n* &#40664;&#35748; `docker.network` &#26159; `\"none\"`&#65288;&#26080;&#20986;&#31449;&#65289;&#12290;\n* `readOnlyRoot: true` &#38459;&#27490;&#21253;&#23433;&#35013;&#12290;\n* `user` &#24517;&#39035;&#26159; root &#25165;&#33021;&#36816;&#34892; `apt-get`&#65288;&#30465;&#30053; `user` &#25110;&#35774;&#32622; `user: \"0:0\"`&#65289;&#12290;\n  &#24403; `setupCommand`&#65288;&#25110; docker &#37197;&#32622;&#65289;&#26356;&#25913;&#26102;&#65292;OpenClaw &#20250;&#33258;&#21160;&#37325;&#24314;&#23481;&#22120;&#65292;&#38500;&#38750;&#23481;&#22120;&#26159;**&#26368;&#36817;&#20351;&#29992;&#30340;**&#65288;&#22312;&#32422; 5 &#20998;&#38047;&#20869;&#65289;&#12290;&#28909;&#23481;&#22120;&#20250;&#35760;&#24405;&#35686;&#21578;&#65292;&#21253;&#21547;&#30830;&#20999;&#30340; `openclaw sandbox recreate ...` &#21629;&#20196;&#12290;\n\n```json5  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\n{\n  agents: {\n    defaults: {\n      sandbox: {\n        mode: \"non-main\", \/\/ off | non-main | all\n        scope: \"agent\", \/\/ session | agent | shared&#65288;&#40664;&#35748;&#20026; agent&#65289;\n        workspaceAccess: \"none\", \/\/ none | ro | rw\n        workspaceRoot: \"~\/.openclaw\/sandboxes\",\n        docker: {\n          image: \"openclaw-sandbox:bookworm-slim\",\n          workdir: \"\/workspace\",\n          readOnlyRoot: true,\n          tmpfs: [\"\/tmp\", \"\/var\/tmp\", \"\/run\"],\n          network: \"none\",\n          user: \"1000:1000\",\n          capDrop: [\"ALL\"],\n          env: { LANG: \"C.UTF-8\" },\n          setupCommand: \"apt-get update &amp;&amp; apt-get install -y git curl jq\",\n          pidsLimit: 256,\n          memory: \"1g\",\n          memorySwap: \"2g\",\n          cpus: 1,\n          ulimits: {\n            nofile: { soft: 1024, hard: 2048 },\n            nproc: 256,\n          },\n          seccompProfile: \"\/path\/to\/seccomp.json\",\n          apparmorProfile: \"openclaw-sandbox\",\n          dns: [\"1.1.1.1\", \"8.8.8.8\"],\n          extraHosts: [\"internal.service:10.0.0.5\"],\n        },\n        prune: {\n          idleHours: 24, \/\/ 0 &#31105;&#29992;&#31354;&#38386;&#28165;&#29702;\n          maxAgeDays: 7, \/\/ 0 &#31105;&#29992;&#26368;&#22823;&#24180;&#40836;&#28165;&#29702;\n        },\n      },\n    },\n  },\n  tools: {\n    sandbox: {\n      tools: {\n        allow: [\n          \"exec\",\n          \"process\",\n          \"read\",\n          \"write\",\n          \"edit\",\n          \"sessions_list\",\n          \"sessions_history\",\n          \"sessions_send\",\n          \"sessions_spawn\",\n          \"session_status\",\n        ],\n        deny: [\"browser\", \"canvas\", \"nodes\", \"cron\", \"discord\", \"gateway\"],\n      },\n    },\n  },\n}\n<\/code><\/pre>\n<p>&#21152;&#22266;&#36873;&#39033;&#20301;&#20110; <code>agents.defaults.sandbox.docker<\/code> &#19979;&#65306;<code>network<\/code>&#12289;<code>user<\/code>&#12289;<code>pidsLimit<\/code>&#12289;<code>memory<\/code>&#12289;<code>memorySwap<\/code>&#12289;<code>cpus<\/code>&#12289;<code>ulimits<\/code>&#12289;<code>seccompProfile<\/code>&#12289;<code>apparmorProfile<\/code>&#12289;<code>dns<\/code>&#12289;<code>extraHosts<\/code>&#12290;<\/p>\n<p>&#22810;&#26234;&#33021;&#20307;&#65306;&#36890;&#36807; <code>agents.list[].sandbox.{docker,browser,prune}.*<\/code> &#25353;&#26234;&#33021;&#20307;&#35206;&#30422; <code>agents.defaults.sandbox.{docker,browser,prune}.*<\/code>&#65288;&#24403; <code>agents.defaults.sandbox.scope<\/code> \/ <code>agents.list[].sandbox.scope<\/code> &#26159; <code>\"shared\"<\/code> &#26102;&#24573;&#30053;&#65289;&#12290;<\/p>\n<h3>&#26500;&#24314;&#40664;&#35748;&#27801;&#31665;&#38236;&#20687;<\/h3>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nscripts\/sandbox-setup.sh<\/p>\n<pre><code>\n&#36825;&#20351;&#29992; `Dockerfile.sandbox` &#26500;&#24314; `openclaw-sandbox:bookworm-slim`&#12290;\n\n### &#27801;&#31665;&#36890;&#29992;&#38236;&#20687;&#65288;&#21487;&#36873;&#65289;\n\n&#22914;&#26524;&#20320;&#24819;&#35201;&#19968;&#20010;&#24102;&#26377;&#24120;&#35265;&#26500;&#24314;&#24037;&#20855;&#65288;Node&#12289;Go&#12289;Rust &#31561;&#65289;&#30340;&#27801;&#31665;&#38236;&#20687;&#65292;&#26500;&#24314;&#36890;&#29992;&#38236;&#20687;&#65306;\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\nscripts\/sandbox-common-setup.sh\n<\/code><\/pre>\n<p>&#36825;&#26500;&#24314; <code>openclaw-sandbox-common:bookworm-slim<\/code>&#12290;&#35201;&#20351;&#29992;&#23427;&#65306;<\/p>\n<p>&#8220;`json5  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n{<br \/>\n  agents: {<br \/>\n    defaults: {<br \/>\n      sandbox: { docker: { image: &#8220;openclaw-sandbox-common:bookworm-slim&#8221; } },<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n### &#27801;&#31665;&#27983;&#35272;&#22120;&#38236;&#20687;\n\n&#35201;&#22312;&#27801;&#31665;&#20869;&#36816;&#34892;&#27983;&#35272;&#22120;&#24037;&#20855;&#65292;&#26500;&#24314;&#27983;&#35272;&#22120;&#38236;&#20687;&#65306;\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\nscripts\/sandbox-browser-setup.sh\n<\/code><\/pre>\n<p>&#36825;&#20351;&#29992; <code>Dockerfile.sandbox-browser<\/code> &#26500;&#24314; <code>openclaw-sandbox-browser:bookworm-slim<\/code>&#12290;&#23481;&#22120;&#36816;&#34892;&#21551;&#29992; CDP &#30340; Chromium &#21644;&#21487;&#36873;&#30340; noVNC &#35266;&#23519;&#22120;&#65288;&#36890;&#36807; Xvfb &#26377;&#22836;&#65289;&#12290;<\/p>\n<p>&#27880;&#24847;&#65306;<\/p>\n<ul>\n<li>&#26377;&#22836;&#65288;Xvfb&#65289;&#27604;&#26080;&#22836;&#20943;&#23569;&#26426;&#22120;&#20154;&#38459;&#27490;&#12290;<\/li>\n<li>&#36890;&#36807;&#35774;&#32622; <code>agents.defaults.sandbox.browser.headless=true<\/code> &#20173;&#28982;&#21487;&#20197;&#20351;&#29992;&#26080;&#22836;&#27169;&#24335;&#12290;<\/li>\n<li>&#19981;&#38656;&#35201;&#23436;&#25972;&#30340;&#26700;&#38754;&#29615;&#22659;&#65288;GNOME&#65289;&#65307;Xvfb &#25552;&#20379;&#26174;&#31034;&#12290;<\/li>\n<\/ul>\n<p>&#20351;&#29992;&#37197;&#32622;&#65306;<\/p>\n<p>&#8220;`json5  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n{<br \/>\n  agents: {<br \/>\n    defaults: {<br \/>\n      sandbox: {<br \/>\n        browser: { enabled: true },<br \/>\n      },<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n&#33258;&#23450;&#20041;&#27983;&#35272;&#22120;&#38236;&#20687;&#65306;\n\n```json5  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\n{\n  agents: {\n    defaults: {\n      sandbox: { browser: { image: \"my-openclaw-browser\" } },\n    },\n  },\n}\n<\/code><\/pre>\n<p>&#21551;&#29992;&#21518;&#65292;&#26234;&#33021;&#20307;&#25509;&#25910;&#65306;<\/p>\n<ul>\n<li>&#27801;&#31665;&#27983;&#35272;&#22120;&#25511;&#21046; URL&#65288;&#29992;&#20110; <code>browser<\/code> &#24037;&#20855;&#65289;<\/li>\n<li>noVNC URL&#65288;&#22914;&#26524;&#21551;&#29992;&#19988; headless=false&#65289;<\/li>\n<\/ul>\n<p>&#35760;&#20303;&#65306;&#22914;&#26524;&#20320;&#20351;&#29992;&#24037;&#20855;&#20801;&#35768;&#21015;&#34920;&#65292;&#28155;&#21152; <code>browser<\/code>&#65288;&#24182;&#20174;&#25298;&#32477;&#20013;&#31227;&#38500;&#23427;&#65289;&#21542;&#21017;&#24037;&#20855;&#20173;&#28982;&#34987;&#38459;&#27490;&#12290;<br \/>\n&#28165;&#29702;&#35268;&#21017;&#65288;<code>agents.defaults.sandbox.prune<\/code>&#65289;&#20063;&#36866;&#29992;&#20110;&#27983;&#35272;&#22120;&#23481;&#22120;&#12290;<\/p>\n<h3>&#33258;&#23450;&#20041;&#27801;&#31665;&#38236;&#20687;<\/h3>\n<p>&#26500;&#24314;&#20320;&#33258;&#24049;&#30340;&#38236;&#20687;&#24182;&#23558;&#37197;&#32622;&#25351;&#21521;&#23427;&#65306;<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\ndocker build -t my-openclaw-sbx -f Dockerfile.sandbox .<\/p>\n<pre><code>\n```json5  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\n{\n  agents: {\n    defaults: {\n      sandbox: { docker: { image: \"my-openclaw-sbx\" } },\n    },\n  },\n}\n<\/code><\/pre>\n<h3>&#24037;&#20855;&#31574;&#30053;&#65288;&#20801;&#35768;\/&#25298;&#32477;&#65289;<\/h3>\n<ul>\n<li><code>deny<\/code> &#20248;&#20808;&#20110; <code>allow<\/code>&#12290;<\/li>\n<li>&#22914;&#26524; <code>allow<\/code> &#20026;&#31354;&#65306;&#25152;&#26377;&#24037;&#20855;&#65288;&#38500;&#20102; deny&#65289;&#37117;&#21487;&#29992;&#12290;<\/li>\n<li>&#22914;&#26524; <code>allow<\/code> &#38750;&#31354;&#65306;&#21482;&#26377; <code>allow<\/code> &#20013;&#30340;&#24037;&#20855;&#21487;&#29992;&#65288;&#20943;&#21435; deny&#65289;&#12290;<\/li>\n<\/ul>\n<h3>&#28165;&#29702;&#31574;&#30053;<\/h3>\n<p>&#20004;&#20010;&#36873;&#39033;&#65306;<\/p>\n<ul>\n<li><code>prune.idleHours<\/code>&#65306;&#31227;&#38500; X &#23567;&#26102;&#26410;&#20351;&#29992;&#30340;&#23481;&#22120;&#65288;0 = &#31105;&#29992;&#65289;<\/li>\n<li><code>prune.maxAgeDays<\/code>&#65306;&#31227;&#38500;&#36229;&#36807; X &#22825;&#30340;&#23481;&#22120;&#65288;0 = &#31105;&#29992;&#65289;<\/li>\n<\/ul>\n<p>&#31034;&#20363;&#65306;<\/p>\n<ul>\n<li>&#20445;&#30041;&#32321;&#24537;&#20250;&#35805;&#20294;&#38480;&#21046;&#29983;&#21629;&#21608;&#26399;&#65306;<br \/>\n  <code>idleHours: 24<\/code>&#12289;<code>maxAgeDays: 7<\/code><\/li>\n<li>&#27704;&#19981;&#28165;&#29702;&#65306;<br \/>\n  <code>idleHours: 0<\/code>&#12289;<code>maxAgeDays: 0<\/code><\/li>\n<\/ul>\n<h3>&#23433;&#20840;&#27880;&#24847;&#20107;&#39033;<\/h3>\n<ul>\n<li>&#30828;&#38548;&#31163;&#20165;&#36866;&#29992;&#20110;<strong>&#24037;&#20855;<\/strong>&#65288;exec\/read\/write\/edit\/apply_patch&#65289;&#12290;<\/li>\n<li>&#20165;&#20027;&#26426;&#24037;&#20855;&#22914; browser\/camera\/canvas &#40664;&#35748;&#34987;&#38459;&#27490;&#12290;<\/li>\n<li>&#22312;&#27801;&#31665;&#20013;&#20801;&#35768; <code>browser<\/code> <strong>&#20250;&#30772;&#22351;&#38548;&#31163;<\/strong>&#65288;&#27983;&#35272;&#22120;&#22312;&#20027;&#26426;&#19978;&#36816;&#34892;&#65289;&#12290;<\/li>\n<\/ul>\n<h2>&#25925;&#38556;&#25490;&#38500;<\/h2>\n<ul>\n<li>&#38236;&#20687;&#32570;&#22833;&#65306;&#20351;&#29992; <a href=\"https:\/\/github.com\/openclaw\/openclaw\/blob\/main\/scripts\/sandbox-setup.sh\"><code>scripts\/sandbox-setup.sh<\/code><\/a> &#26500;&#24314;&#25110;&#35774;&#32622; <code>agents.defaults.sandbox.docker.image<\/code>&#12290;<\/li>\n<li>&#23481;&#22120;&#26410;&#36816;&#34892;&#65306;&#23427;&#20250;&#25353;&#38656;&#20026;&#27599;&#20010;&#20250;&#35805;&#33258;&#21160;&#21019;&#24314;&#12290;<\/li>\n<li>&#27801;&#31665;&#20013;&#30340;&#26435;&#38480;&#38169;&#35823;&#65306;&#23558; <code>docker.user<\/code> &#35774;&#32622;&#20026;&#19982;&#20320;&#25346;&#36733;&#30340;&#24037;&#20316;&#21306;&#25152;&#26377;&#26435;&#21305;&#37197;&#30340; UID:GID&#65288;&#25110; chown &#24037;&#20316;&#21306;&#25991;&#20214;&#22841;&#65289;&#12290;<\/li>\n<li>&#25214;&#19981;&#21040;&#33258;&#23450;&#20041;&#24037;&#20855;&#65306;OpenClaw &#20351;&#29992; <code>sh -lc<\/code>&#65288;&#30331;&#24405; shell&#65289;&#36816;&#34892;&#21629;&#20196;&#65292;&#36825;&#20250; source <code>\/etc\/profile<\/code> &#24182;&#21487;&#33021;&#37325;&#32622; PATH&#12290;&#35774;&#32622; <code>docker.env.PATH<\/code> &#20197;&#22312;&#21069;&#38754;&#28155;&#21152;&#20320;&#30340;&#33258;&#23450;&#20041;&#24037;&#20855;&#36335;&#24452;&#65288;&#20363;&#22914; <code>\/custom\/bin:\/usr\/local\/share\/npm-global\/bin<\/code>&#65289;&#65292;&#25110;&#22312;&#20320;&#30340; Dockerfile &#20013;&#22312; <code>\/etc\/profile.d\/<\/code> &#19979;&#28155;&#21152;&#33050;&#26412;&#12290;<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Docker Docker&#65288;&#21487;&#36873;&#65289; Docker &#038;# [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-156","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/156","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/comments?post=156"}],"version-history":[{"count":2,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/156\/revisions"}],"predecessor-version":[{"id":791,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/156\/revisions\/791"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}