---
title: "Run Claude Code in a Docker sandbox"
description: "Run Claude Code in a sandbox"
canonical: "https://ian.is/claude-docker-sandbox"
language: "en"
---

[Ian Nuttall](https://ian.is/)

# Run Claude Code in a Docker sandbox

June 20, 2025

Want to run Claude Code in yolo mode but don't want it to potentially cripple your system? Easy 🔥

Install Docker to run it in a sandbox w/ this script:

```text
curl -sSL https://gist.github.com/iannuttall/da878e583f39029a121727ce83174f82/raw/safe-yolo.sh | bash
```

Script below:

Video from the original post

The script:

\- builds Anthropic's official secure docker container
\- creates a "yolo" command to run docker + \`claude --dangerously-skip-permissions\`
\- mounts your current folder when you run yolo

[https://gist.githubusercontent.com/iannuttall/da878e583f39029a121727ce83174f82](https://gist.githubusercontent.com/iannuttall/da878e583f39029a121727ce83174f82)

## Newsletter

Join 9.2k subscribers
