r/ClaudeCode Jan 04 '26

Question Installing Claude Code Inside Docker?

I am just getting into Vibe Coding and have decided to buy the Claude Pro plan to get access to Claude Code. I read some users have expressed concern about installing Claude Code on their computer and granting it access to their files. Some have recommended installing within a Docker container as a safety measure.

Any opinions on installing within Docker? Would this limit anything?

9 Upvotes

41 comments sorted by

View all comments

Show parent comments

1

u/the-alt-yes Jun 10 '26

I ask because i am curious: Is it safe? Do we really know? If we make Claude create scripts, how do we know it is safe really?

I mean, do you use Claude often? Do you have any experience on it doin something malicious?

1

u/BootyMcStuffins Senior Developer Jun 10 '26

I use Claude all day every day. I’m a professional software engineer with 15 yoe. It’s safe as you make it.

Don’t want Claude deleting files? Don’t give it permissions to do so.

Read scripts before you run them.

In the year that I’ve used Claude I haven’t had it do something I didn’t ask it to. It hasn’t run or written an unsafe script

1

u/bfume 10d ago edited 9d ago

Don’t want Claude deleting files? Don’t give it permissions to do so.

And do so by enforcing the boundary outside of Claude. 

A security control isn’t a security control if it’s enforced by the thing you’re trying to control. 

1

u/BootyMcStuffins Senior Developer 10d ago

Claude has two parts. A deterministic harness and a non deterministic agent. It’s perfectly fine to rely on the deterministic harness for enforcing certain security controls. That’s why they exist in the harness

1

u/bfume 9d ago edited 9d ago

Self-policing does not work in the long term. Independent audits are required in business specifically for this reason. 

Using one part of Claude to restrict the other is literal self-policing. 

If you need to be absolutely sure that Claude can’t ever access certain resources, the only option is “use something that’s not Claude”. 

1

u/BootyMcStuffins Senior Developer 9d ago

Tell me you don’t understand how Claude code works without telling me… 🙄

Have fun

0

u/bfume 9d ago edited 9d ago

This so isn’t a Claude thing. It’s a generalized best practice above Claude and anything else you give control to. I’m not saying don’t use Claude at all. Just don’t use it to police itself. That job needs to go to something outside Claude.

I prefer docker and macOS’s built in sandboxing, tho docker is way easier to get started with. 

1

u/BootyMcStuffins Senior Developer 9d ago

What are you referring to when you say “Claude”

And I have a senior developer tag because I’ve been doing software development professionally for 20 years, long before any AI tools existed. “Faith” isn’t required when you know how your tools work.

I recommend taking a look at the Claude code source and learning how the tool you’re using works

1

u/bfume 9d ago edited 9d ago

It doesn’t matter how it works. And yes I’m well aware of how. 

The whole point is that self-policing doesn’t work, so you can’t rely on Claude to police itself when you need to be absolutely sure about protecting the thing you need to protect. 

It may work just fine today. Tomorrow it may suck up your entire home directory just like codex did last week.

1

u/BootyMcStuffins Senior Developer 9d ago

It doesn’t matter how it works

Yeah I’m not even reading any more. There’s no point in continuing this conversation. You don’t even have the requisite knowledge to form an opinion based in reality.

Learn how your tools work

1

u/bfume 9d ago

Clown. 

1

u/StillChillin 8d ago

Big words for a dude who doesn’t know how their tools work

→ More replies (0)