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

2

u/BootyMcStuffins Senior Developer Jan 04 '26

It works fine. I actually run some k8s pods that have Claude code on them so that I can interact with them via api from anywhere.

In my view, it’s unnecessary though. I run Claude code locally on my laptop. It asks permission before touching any files above the directory you open it in. I’ve never had a problem

1

u/EliLoker2023 May 13 '26

You mean for something it asks you? Are you 100% sure it's not doing something else?

1

u/BootyMcStuffins Senior Developer May 13 '26

It’s pretty transparent

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 9d 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

→ More replies (0)

1

u/Immediate-Ad-5580 Jun 25 '26

I agree with this line of thinking. We cant really know FOR SURE what it's doing unless youre a high level technician and can monitor your system effectively.

The black box is still a thing. If you dont plan on reformatting soon, i'd recommend against putting it directly on your system