openclaw - 💡(How to fix) Fix Add a slim Docker image mode with configurable APT package installation

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
RAW_BUFFERClick to expand / collapse

Problem

Running OpenClaw from a remotely pulled Docker image is awkward when the host needs extra system packages.

Today the practical flow is often:

  1. Pull or update the OpenClaw Docker image remotely.
  2. Start the container.
  3. Enter the container manually.
  4. Run apt-get update && apt-get install ... for host-specific tools.
  5. Repeat this after image refreshes or container rebuilds.

This is especially painful for small deployments where local Docker builds are slow or unavailable, but the runtime still needs a few APT packages.

Proposal

Add a lightweight Docker image mode or startup path that can:

  • Pull/use the standard remote OpenClaw Docker image.

  • Keep the base image reasonably slim.

  • Read an environment variable such as OPENCLAW_IMAGE_APT_PACKAGES.

  • On container startup or first boot, install the requested packages automatically, for example:

    OPENCLAW_IMAGE_APT_PACKAGES="curl jq imagemagick"

Expected behavior:

apt-get update
apt-get install -y --no-install-recommends $OPENCLAW_IMAGE_APT_PACKAGES
rm -rf /var/lib/apt/lists/*

The install step should be skipped when the variable is empty.

Why this helps

This keeps the default image smaller while still supporting deployments that need a few OS-level utilities. It also avoids requiring users to build a custom Docker image locally or manually enter the container after every update.

Notes / open questions

  • It may be better to implement this as an opt-in entrypoint/bootstrap step rather than baking more packages into the default image.
  • If automatic install at every startup is too slow, the implementation could cache/mark completion for the current package list.
  • Package names come from the deployer, so this should remain explicit and opt-in.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Add a slim Docker image mode with configurable APT package installation