Live data from Hacker News

Switching to Claude Code and VSCode Inside Docker

timsh.org

121–130 of 170 posts

Re: Switching to Claude Code and VSCode Inside Docker

#121

If you are a VSCode hater (like me), you can achieve the same thing using the open-source, Microsoft-built, official devcontainer CLI [0], which is exactly what VSCode uses under the hood. You don't get automatic port forwarding with this tool, which includes SSH Agent forwarding, so you'll likely want to pair this with installing SSH into your devcontainers, or using some other tool that does the job. I built a tool…

> If you are a VSCode hater (like me) What are some reasons to hate VSCode?

It's proprietary software masquerading as open-source, for one, and intentionally fosters dependence on its vendor for the plugins that support the most popular languages as well as key features (remote editing, WSL support, integration with the mainline plugin repos), for one.

Re: Switching to Claude Code and VSCode Inside Docker

#122
post #86

Earlier quoted context omitted.

I don’t know, others might be better out of the box. But once you start adding features they all become a mess. I rather just deal with a known mess and not waste time with tools.

I'd waste time with tools. I have my vim config, my git config, my emacs config, my bash config,... that I copy over to any development environment I have. And every now and then, I go into the manual or other people config to check if there's any new trick I can apply. Comfort is something invaluable when doing a task. I can accept discomfort when I'm in an unfamiliar environment, but not when it's going to be somet…

Perhaps the difference is that VSCode and plugins change too often and requires too much maintenance?

Re: Switching to Claude Code and VSCode Inside Docker

#123
post #38

Earlier quoted context omitted.

Have you tried setting up multiple git worktrees as well? I wonder if that doesn’t solve most of the issues.

I have, but I just found that a bit tedious to manage manually. Maybe another version of this script would just be to automatically create a worktree, run a prompt in that, and then have the script manage the results, and clean up the worktree at the end.

https://github.com/stravu/crystal

This is still alpha, but I have been using it to handle the multi-agent worktree paradigm.

Re: Switching to Claude Code and VSCode Inside Docker

#124

I don't get these posts. I'm using claude --dangerously-skip-permissions all day and haven't had a single issue. In my experience it doesn't just randomly start erasing your hard drives. Also having a proper CLAUDE.md probably helps.

> I'm using claude --dangerously-skip-permissions all day and haven't had a single issue. Yet. You haven't had a single issue yet.

Correct. The number of times I’ve had Claude ask permission to rm -rf paths with .. elements is more than zero.

Re: Switching to Claude Code and VSCode Inside Docker

#125

I have enjoyed running Claude Code in a container. The biggest advantage for me isn't security though, it's how easy it becomes to spin off agents to work in the background. I use a simple script that copies my working directory into a container, prompts Claude Code, and then either saves a planning document locally, or opens a pull request in GitHub for me to review. I quite like this because it makes starting agent…

And thus, the machines managed to build trust in their harmlessness in men. Which, eventually, would turn out advantageous..

Yeah the point of security is missed. Given how easy it is, I doubt I'm ever going to run Claude code or any other CLI that uses remote AI servers without a devcontainer again

Re: Switching to Claude Code and VSCode Inside Docker

#127
I started working with VSCode in container ~3 years ago [1], at first I just felt I'd like to have control over the environment but later it made more sense when I switched to codeium windsurf [2]- I thought it's safer not to let agent loose in my filesystem

[1] https://github.com/grzegorzk/vscode_in_podman

[2] https://github.com/grzegorzk/codeium_windsurf_in_podman

Re: Switching to Claude Code and VSCode Inside Docker

#128

If you are a VSCode hater (like me), you can achieve the same thing using the open-source, Microsoft-built, official devcontainer CLI [0], which is exactly what VSCode uses under the hood. You don't get automatic port forwarding with this tool, which includes SSH Agent forwarding, so you'll likely want to pair this with installing SSH into your devcontainers, or using some other tool that does the job. I built a tool…

> If you are a VSCode hater (like me) What are some reasons to hate VSCode?

Microsoft injects proprietary spyware into the official builds that you can't see from the source code. You can get unofficial builds of just the source code from the VsCodium project, but Microsoft blocks your ability to install a lot of extensions if you don't use the official build.

Re: Switching to Claude Code and VSCode Inside Docker

#129

I don't get these posts. I'm using claude --dangerously-skip-permissions all day and haven't had a single issue. In my experience it doesn't just randomly start erasing your hard drives. Also having a proper CLAUDE.md probably helps.

You ignore safety features unless you have already experienced disaster? Do you wear a seat belt? Run all commands as root?

The history of computing says that everything is a porous security boundary just waiting for a motivated individual to attack it. Defense in layers, especially in the wild west of AI where everybody is playing move fast and break things at breakneck speed.

Re: Switching to Claude Code and VSCode Inside Docker

#130
post #56

2-ish questions: Is this level of fear typical or reasonable? If so, why doesn’t Anthropic / AI code gen providers offer this type of service? Hard to believe Anthropic is not secure in some sense — like what if Claude Code is already inside some container-like thing? Is it actually true that Claude cannot bust out of the container?

re Anthropic: there is a whole docs section on devcontainers https://docs.anthropic.com/en/docs/claude-code/devcontainer and an example repo https://github.com/anthropics/claude-code/tree/main/.devcont...

--cap-add=NET_ADMIN

--cap-add=NET_RAW

https://github.com/anthropics/claude-code/blob/main/.devcont...

If the cointainer route (with those types of privileges) is being suggested from a security point of view, then might as well run these processes in a VM and call it a day :/

Post reply on HN