Skip to content

feature/OPENCLAW_IMAGE#7986

Open
ozbillwang wants to merge 4 commits intoopenclaw:mainfrom
ozbillwang:feature/OPENCLAW_IMAGE
Open

feature/OPENCLAW_IMAGE#7986
ozbillwang wants to merge 4 commits intoopenclaw:mainfrom
ozbillwang:feature/OPENCLAW_IMAGE

Conversation

@ozbillwang
Copy link

@ozbillwang ozbillwang commented Feb 3, 2026

This is for the idea I discussed in #2178 (comment)

My way is flexible and easy.

The improvment:

  • When the environment variable OPENCLAW_IMAGE in script docker-setup.sh is not set, the setup script builds the Docker image locally and runs it through docker compose.
  • In docker-compose.yml, it references the same environment variable OPENCLAW_IMAGE, my understanding is, this is the right way to use this variable, it is for pre-build image.
  • When the variable OPENCLAW_IMAGE is set to anything other than openclaw:local, for example, ghcr.io/clawdbot/clawdbot:main or any other valid image name, the build step is skipped. Instead, the image is pulled directly, which reduces a lot of build time.

Here is the Usage:

export OPENCLAW_IMAGE="ghcr.io/clawdbot/clawdbot:main"
./docker-setup.sh

Note:

OPENCLAW_DOCKER_APT_PACKAGES only works at build time, which doesn't help users pulling pre-built images

This issue can be resolved easily by installing the required apt packages later, but it does require a manual step.

Greptile Overview

Greptile Summary

This PR updates docker-setup.sh to support using a prebuilt Docker image via OPENCLAW_IMAGE: when the image name is the default openclaw:local it builds locally, otherwise it pulls the specified image before running the onboarding and starting services via docker compose.

This fits into the existing setup flow by keeping .env generation/upsert the same (including writing OPENCLAW_IMAGE), while changing the image acquisition step from “always build” to “build or pull depending on image name.”

Confidence Score: 4/5

  • This PR is likely safe to merge, with a small risk of compose/build configuration mismatch.
  • The change is localized to docker-setup.sh and is straightforward (build vs pull). Main uncertainty is whether docker-compose.yml is configured to use the pulled image without still trying to build from a local context, which would break the new flow for non-local images.
  • docker-compose.yml (ensure it uses OPENCLAW_IMAGE as image and does not require build in the pull path)

@openclaw-barnacle openclaw-barnacle bot added the docker Docker and sandbox tooling label Feb 3, 2026
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@ozbillwang ozbillwang closed this Feb 3, 2026
@ozbillwang ozbillwang reopened this Feb 3, 2026
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

ozbillwang and others added 2 commits February 4, 2026 10:43
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@ozbillwang
Copy link
Author

image Not sure why these jobs are always in pending status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker and sandbox tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant