Skip to content

feat: migrate bot containers to Ubuntu 24.04 Noble with recreate API#25

Merged
jgarzik merged 2 commits into
mainfrom
updates
Mar 12, 2026
Merged

feat: migrate bot containers to Ubuntu 24.04 Noble with recreate API#25
jgarzik merged 2 commits into
mainfrom
updates

Conversation

@jgarzik
Copy link
Copy Markdown
Owner

@jgarzik jgarzik commented Mar 12, 2026

Convert Dockerfile.botenv from single-stage Debian Bookworm (inherited from OpenClaw) to a multi-stage build using Ubuntu Noble as the runtime base. This gives significantly better HDL/FPGA package coverage (nextpnr-ecp5, yosys-abc, yosys-plugin-ghdl, ghdl-tools) and adds libboost-all-dev. OpenClaw app and Node.js runtime are copied from the upstream image in the first stage.

Add DockerService.recreateContainer() which inspects an existing container, preserves its full config (env, binds, ports, network, labels, healthcheck), removes it, and creates a new one with a different image. Exposed via POST /api/bots/:hostname/recreate and POST /api/admin/recreate-all for bulk image upgrades.

Convert Dockerfile.botenv from single-stage Debian Bookworm (inherited
from OpenClaw) to a multi-stage build using Ubuntu Noble as the runtime
base. This gives significantly better HDL/FPGA package coverage
(nextpnr-ecp5, yosys-abc, yosys-plugin-ghdl, ghdl-tools) and adds
libboost-all-dev. OpenClaw app and Node.js runtime are copied from the
upstream image in the first stage.

Add DockerService.recreateContainer() which inspects an existing
container, preserves its full config (env, binds, ports, network,
labels, healthcheck), removes it, and creates a new one with a
different image. Exposed via POST /api/bots/:hostname/recreate and
POST /api/admin/recreate-all for bulk image upgrades.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jgarzik jgarzik requested a review from Copilot March 12, 2026 02:42
@jgarzik jgarzik self-assigned this Mar 12, 2026
@jgarzik jgarzik added the enhancement New feature or request label Mar 12, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the bot runtime/container environment to Ubuntu 24.04 (Noble) for improved HDL/FPGA tooling availability and adds an API + service method to recreate existing bot containers with a new image while preserving key container configuration.

Changes:

  • Migrate Dockerfile.botenv to a multi-stage build that copies OpenClaw + Node from an upstream image into an Ubuntu Noble runtime and installs expanded toolchains (incl. Boost + FPGA tooling).
  • Add DockerService.recreateContainer() and expose it via POST /api/bots/:hostname/recreate and POST /api/admin/recreate-all.
  • Add unit tests for DockerService.recreateContainer() and update README config text for OPENCLAW_BASE_IMAGE.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/services/DockerService.ts Adds recreateContainer() to rebuild a bot container using a new image while carrying forward selected config.
src/services/DockerService.test.ts Adds unit tests validating recreate behavior and config preservation.
src/server.ts Adds API endpoints to recreate one bot container or all bot containers.
README.md Updates OPENCLAW_BASE_IMAGE description to reflect the new multi-stage approach.
Dockerfile.botenv Converts botenv image to Ubuntu Noble multi-stage build and installs expanded dev/FPGA toolchain.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment thread src/services/DockerService.ts Outdated
Comment thread src/services/DockerService.ts
Comment thread src/services/DockerService.ts Outdated
Comment thread Dockerfile.botenv
Comment thread Dockerfile.botenv
Comment thread src/server.ts
Comment thread src/server.ts
Install Playwright and Chromium system dependencies in botenv container
for browser automation. Set ShmSize to 1GB in container HostConfig to
prevent Chromium OOM crashes. Harden recreateContainer() to tolerate
404 on remove and update bot status on failure. Document recreate API
endpoints in README.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jgarzik jgarzik merged commit 3eb4f83 into main Mar 12, 2026
3 checks passed
@jgarzik jgarzik deleted the updates branch March 12, 2026 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants