Skip to content

Refactor CMD in Dockerfile and update start-openclaw.sh for improved argument handling#62

Merged
haobibo merged 9 commits into
mainfrom
dev/openclaw_0622
Jul 1, 2026
Merged

Refactor CMD in Dockerfile and update start-openclaw.sh for improved argument handling#62
haobibo merged 9 commits into
mainfrom
dev/openclaw_0622

Conversation

@namelessman

Copy link
Copy Markdown
Contributor

This pull request refactors how the OpenClaw Docker container handles its startup command and argument parsing to improve flexibility and compatibility with Docker best practices. The main changes are in how the entrypoint script processes arguments and starts the service.

Entrypoint and Argument Handling Improvements:

  • Changed the CMD instruction in openclaw.Dockerfile to use JSON array form for better argument handling and to allow overriding the command more easily in Docker (start-openclaw.sh gateway --allow-unconfigured is now ["start-openclaw.sh", "gateway", "--allow-unconfigured"]).
  • Updated start-openclaw.sh to check if arguments are passed: if the first argument is an executable, it will run it directly (e.g., bash, sh, sleep), otherwise it will pass arguments to the openclaw CLI with default bind/port options. If no arguments are provided, it starts the OpenClaw gateway with default options.

General Script Improvements:

  • Minor cleanup in start-openclaw.sh, such as removing an unnecessary blank line.

@haobibo haobibo merged commit cbb6e33 into main Jul 1, 2026
21 checks passed
@haobibo haobibo deleted the dev/openclaw_0622 branch July 1, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants