C
Coder.com•5mo ago
Mete

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!
7 Replies
Codercord
Codercord•5mo ago
Codercord
Codercord•5mo ago
<#1378045463239852155>
Category
Help needed
Product
Coder (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
Mete
MeteOP•5mo ago
Coder version: v2.22.1+8708d81
Phorcys
Phorcys•5mo ago
are you able to run the containers as a user that isn't root? (@Mete)
Mete
MeteOP•5mo ago
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. šŸ˜„
Phorcys
Phorcys•4mo ago
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.
Yes, we currently don't support ordering scripts which makes things harder when dependencies are needed. The cleaner way to achieve this would've been to either package these tools inside your template's image. Or use the experiment_pre_install_script module argument to install these tools. can you specify what you mean by "local model" and "Goose shim" in this context? From what I understood you were running the DeepSeek R1-0528 model locally through Goose?
Mete
MeteOP•4mo ago
I'm running R1 on a workstation locally with an OpenAI compatible endpoint, and I simply redirect goose to use it, goose offers tool_shims which seem to help non-function-calling llms to be more successful with tool calls

Did you find this page helpful?