Live data from Hacker News

Switching to Claude Code and VSCode Inside Docker

timsh.org

131–140 of 170 posts

Re: Switching to Claude Code and VSCode Inside Docker

#131
post #118
post #84

I thought it was more commonplace to develop inside containers or vms. I don’t trust running npm or pip or gradle or go install in my own machine.

I use VMs myself. I use Proxmox and have it setup so that I can spin up a fresh VM in around 10-20 seconds when needed. I also like that I can take snapshots. I really want to limit the amount of software I am installing on my main system due to possible security issues.

Do you have any example scripts for your setup?

I have recently moved to a VM only development workflow, but still feeling some growing pains as I figure out a good setup. I run my IDE in the guest, which is kind of crummy - responsiveness is worse + the VMs are a lot heavier than a headless code setup would be. I have thought about using a Flatpak IDE with filesystem access disabled as a potential middle ground solution so that the guests could be minimal images connected by SSH.

Re: Switching to Claude Code and VSCode Inside Docker

#132

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…

Not loving that the devcontainers CLI is node. The appeal of devcontainers is to limit the amount of code I have to trust on my host. Give me a small static binary I can deploy to new systems.

Re: Switching to Claude Code and VSCode Inside Docker

#133

Letting Claude Code loose on my home folder feels bad yes. Would using a separate user account solve it? I.e. keep git repos in for example /home/claude and run claude as that user? Or am I missing something?

I do pretty much this.

- /home/me -- 660 default permissions

- /home/me/project -- owner "claude", add "me" to "claude" group

- symlink /home/claude/project to /home/me/project

- Run claude in different user session

- Use CTRL+ALT+F2 to immediately switch between my main and claude sessions. Claude continues working in the background.

Re: Switching to Claude Code and VSCode Inside Docker

#134

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?

I do not hate it when others are using it (none of my business). But I do not like to use bloatware. Text editor that eats RAM (even excluding LSP) like 3d editing software.

Re: Switching to Claude Code and VSCode Inside Docker

#135

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?

Each time I try to use it, I find myself distracted by the impulse to fix the bugs that I notice. There's always this moment when I find a comment from myself, several years earlier, in an issue that's still open because it's unclear whether it's a VSCode problem or a plugin problem, and it's like: "oh, here I am again, doing this instead of working".

That's not to say it's especially buggy, it's just so large, there are a lot of places for bugs to hide.

I get distracted by the impulse to contribute to other editors also, but those are contributions that I'm happy about. They don't always result in bugs fixed or features added, sometimes somebody says "no" but at least it resolves in some way. With VSCode it feels like I'm going in circles.

Re: Switching to Claude Code and VSCode Inside Docker

#136
post #85

Honest question: why do people prefer developing code inside a docker? I get the benefits of docker as a deployment unit, but wouldn’t configuring a dev container and using it a hassle nonetheless, compared to not doing them at all?

Personally I don’t trust running npm/pip/gradle/etc in my own machine. I feel more secure running them in containers or VMs. Some IDEs like jetbrains’ support remote development (it’s not perfect but better than risking my own machine)

Do you feel safe driving in traffic / breathing polluted air / having restaurants prepare your food?

Re: Switching to Claude Code and VSCode Inside Docker

#137
post #121

Earlier quoted context omitted.

> 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.

But Cursor, a fork not developed by Microsoft, ships with remote editing, wsl support, etc

Re: Switching to Claude Code and VSCode Inside Docker

#138
post #39

And you don't need to stop there. Claude Code also has great open alternatives you can run in any environment you like, with any model, and under economic arrangements you define. See https://oss-ai-swe.org/ for a few. My current favs are OpenHands and Codex CLI.

Aren’t those _way_ more expensive per token?

you can use your claude code subscription with opencode (not sure how "legal" that is); github copilot straight up provides an api (very "legal")

Re: Switching to Claude Code and VSCode Inside Docker

#139
post #39

And you don't need to stop there. Claude Code also has great open alternatives you can run in any environment you like, with any model, and under economic arrangements you define. See https://oss-ai-swe.org/ for a few. My current favs are OpenHands and Codex CLI.

Aren’t those _way_ more expensive per token?

How so? Claude is the most expensive. With open tools you can choose whatever model delivers the best results for the budget you have.

Re: Switching to Claude Code and VSCode Inside Docker

#140
post #39

Earlier quoted context omitted.

Aren’t those _way_ more expensive per token?

Yes and I really hope more models consider pricing like Claude Max. There's also the option of choosing local models but I haven't tried that yet. Claude is just too good to spend time elsewhere (at the moment).

TANSTAAFL

https://everything.intellectronica.net/p/all-you-can-eat-eco...

Post reply on HN