Conversation
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>
There was a problem hiding this comment.
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.botenvto 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 viaPOST /api/bots/:hostname/recreateandPOST /api/admin/recreate-all. - Add unit tests for
DockerService.recreateContainer()and update README config text forOPENCLAW_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.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.