Claude code - K8s devcontainer pattern
Hey everyone, I'm excited to be here and big thanks to the Coder team for all the hard work on this project! š
I've been trying to get the new Claude Code module working inside a DevContainer on Kubernetes. Setting install_claude_code: true in my template fails to install claude code, and when I try to inject it through startup_script in the coder_agent container, I hit this error:
--dangerously-skip-permissions cannot be used with root
I did notice the line in the docs mentioning that: codercom/oss-dogfood could be used for testing on container-based workspaces.
That said, our current setup relies on DevContainers and the envbuilder pattern, which we'd prefer to stick with for now.
Has anyone else tried running Claude Code with this setup? Did you run into the same installation issues or find a workaround? Any tips or experiences would be hugely appreciated!
5 Replies
<#1378045463239852155>
Category
Help needed
Product
Coder (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
Coder version: v2.22.1+8708d81
are you able to run the containers as a user that isn't root?
(@Mete)
Hey, I gave it a shot, but since Iām still new to the Coder ecosystem, I couldnāt get things working the way I wantedāso I gave up on Claude Code and switched to Goose instead. That also needed quite a few adjustments. I ended up writing a Terraform module that bundles the Node.js, Goose, screen tmux etc. installations together, since I couldnāt get Terraform to wait for the setup to finish inside the DevContainer. That setup actually worked.
The experience with local models (Using DeepSeek R1-0528 671B) has been kind of meh, which I expected. The MCP function names (like coder__report_task) are hard for the models to invoke correctly, so they keep failing and retrying. That said, about 1 in 5 times I can get them to successfully report āinitialization is doneā to the dashboard after creating a workspace. I havenāt tried anything more complex yet. Planning to try the Goose shims next.
Also, it was hilarious to see the model say things like āuser mentions reading goosehints before starting a taskā and then completely ignore itāwhile making fun of the entire concept of gooses. š