Open
Conversation
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Author
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.

This is for the idea I discussed in #2178 (comment)
My way is flexible and easy.
The improvment:
OPENCLAW_IMAGEin script docker-setup.sh is not set, the setup script builds the Docker image locally and runs it throughdocker compose.OPENCLAW_IMAGE, my understanding is, this is the right way to use this variable, it is for pre-build image.OPENCLAW_IMAGEis set to anything other thanopenclaw:local, for example,ghcr.io/clawdbot/clawdbot:mainor 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:
Note:
OPENCLAW_DOCKER_APT_PACKAGESonly works at build time, which doesn't help users pulling pre-built imagesThis 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.shto support using a prebuilt Docker image viaOPENCLAW_IMAGE: when the image name is the defaultopenclaw:localit builds locally, otherwise it pulls the specified image before running the onboarding and starting services viadocker compose.This fits into the existing setup flow by keeping
.envgeneration/upsert the same (including writingOPENCLAW_IMAGE), while changing the image acquisition step from “always build” to “build or pull depending on image name.”Confidence Score: 4/5
docker-setup.shand is straightforward (build vs pull). Main uncertainty is whetherdocker-compose.ymlis 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.