Skip to content

🔧 update (cli): add --docker flag for container environments#40

Draft
youhanasheriff wants to merge 1 commit intowarengonzaga:devfrom
youhanasheriff:fix/docker-setup-flag
Draft

🔧 update (cli): add --docker flag for container environments#40
youhanasheriff wants to merge 1 commit intowarengonzaga:devfrom
youhanasheriff:fix/docker-setup-flag

Conversation

@youhanasheriff
Copy link
Contributor

@youhanasheriff youhanasheriff commented Feb 26, 2026

Summary

This PR adds a "--docker" flag and auto-detection for Docker/container environments to route setup to the web-based flow, preventing the CLI prompts from hanging in non-TTY container environments.

Changes

  • Added "--docker" flag that routes to web-based setup (same as "--web")
  • Auto-detect Docker/container environments via:
    • CI, CONTAINER, DOCKER_CONTAINER env vars
    • /.dockerenv file
    • /proc/1/cgroup container indicators (docker, containerd, kubepods, lxc, podman)
  • Added container detection warning in interactive setup to guide users
  • Updated help text with "--docker" documentation

Testing

  • Run tinyclaw setup --docker in a container environment
  • Verify auto-detection works by running in Docker without flags
  • Verify warning appears when running interactive setup in container

Related Issue

Closes #12

Checklist

  • Code builds successfully (bun build)
  • Tests pass (bun test)
  • Documentation updated (help text)
  • Follows Clean Commit convention
  • CLA signed (will be prompted on PR open)

@CLAassistant
Copy link

CLAassistant commented Feb 26, 2026

CLA assistant check
All committers have signed the CLA.

- Add --docker flag that routes to web-based setup
- Auto-detect Docker/container environments via:
  - CI, CONTAINER, DOCKER_CONTAINER env vars
  - /.dockerenv file
  - /proc/1/cgroup container indicators
- Add container detection warning in interactive setup
- Update help text with --docker documentation

Closes warengonzaga#12
@youhanasheriff
Copy link
Contributor Author

Guys, I'm still working on this. I just created this to keep track of this

@warengonzaga warengonzaga marked this pull request as draft February 27, 2026 02:55
@warengonzaga
Copy link
Owner

@youhanasheriff put it into the draft if you still working on it, I will also update the container build flow and package build flow action to not run without significant changes to the codebase.

@warengonzaga
Copy link
Owner

Also, we are going to use a tool as moving forward before contributing to the project.
https://waren.build/contribute-now (I'll let you know once we are going to make this standard way to contribute, still fixing some bugs)

@youhanasheriff
Copy link
Contributor Author

@warengonzaga, That's great. Thanks for letting me know.

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.

3 participants