YouTube2Text

Docker Sandboxes - Safe and Secure Agents — Transcript

by Sam Witteveen · 4,421 words · 592 segments · language en · Watch on YouTube

Full transcript

  1. 0:00Okay, so one of the biggest pain points
  2. 0:02at the moment if you're running any kind
  3. 0:04of agent is the whole safety factor.
  4. 0:07Now, this can be if you're running
  5. 0:08coding agents, things like Claude code,
  6. 0:11Codex, etc. Where you just don't want to
  7. 0:14have to sit there babysitting doing yes
  8. 0:16allow, yes allow, no don't touch that
  9. 0:19for the next sort of 3 hours. Now, of
  10. 0:21course you've got the option of
  11. 0:22dangerously skip permissions, but then
  12. 0:25you've got to worry about what it's
  13. 0:26actually going to do to your system, is
  14. 0:28it going to wipe your drive, etc. And
  15. 0:30all of this is compounded if you're
  16. 0:32using agents like Hermes or open claw or
  17. 0:35even creating your own custom agents.
  18. 0:38So, while we want our agents to
  19. 0:40basically have autonomy and to be able
  20. 0:42to do different things, we also want to
  21. 0:45have them locked down so that they're
  22. 0:48safe and they're not just going to wipe
  23. 0:50your hard drive, etc. This is where
  24. 0:52Docker has been working on a really good
  25. 0:53solution for this and they've agreed to
  26. 0:55sponsor this video so I can tell you all
  27. 0:57about it. So, what I'm talking about is
  28. 0:59Docker sandboxes.
  29. 1:00So, the idea here is that you can use
  30. 1:03these for coding agents, you can use
  31. 1:06these for sort of local personal agents,
  32. 1:08you can even use it for your own custom
  33. 1:10agents. But, what it is doing is
  34. 1:13allowing you to create a sandbox where
  35. 1:16you determine things like what network
  36. 1:19access the agent can have, where you
  37. 1:21determine what models it can use, where
  38. 1:23you determine things like what storage
  39. 1:25folders it's allowed to read from and
  40. 1:28also what folders it's allowed to
  41. 1:29actually write to, etc. And then
  42. 1:31probably one of the biggest ones is you
  43. 1:33want to basically have a way to lock
  44. 1:36down your credentials so that the agent
  45. 1:39itself can't just start going out and
  46. 1:41giving your credentials to other people
  47. 1:43if someone tries to prompt inject it,
  48. 1:45etc. So, Docker sandboxes allows you to
  49. 1:48basically lock all of these things down
  50. 1:51and to define simple policies that give
  51. 1:53you the control that you want for each
  52. 1:55of the things that you want your agent
  53. 1:56to be able to do. So, in this video I'm
  54. 1:58going to look at how to basically set
  55. 2:00this up. We'll look at creating
  56. 2:02sandboxes. We'll look at how do you give
  57. 2:04different sandboxes different
  58. 2:06permissions, et cetera. How do you allow
  59. 2:08it to have access to the credentials?
  60. 2:10How do you set up a proxy for
  61. 2:12credentials? And for me, one of the
  62. 2:14biggest things here is just how quickly
  63. 2:17you can basically try out new agents
  64. 2:20that are out there, set them up and
  65. 2:22connect them to perhaps a local model on
  66. 2:24LM Studio or something, run them for a
  67. 2:27few hours to see how they actually go,
  68. 2:30and not have to worry, is this thing
  69. 2:32going to be making changes to my
  70. 2:33computer or messing up my file system,
  71. 2:35et cetera. All right, so let's start off
  72. 2:37with what actually this is. This is not
  73. 2:40normal Docker containers. So, Docker's a
  74. 2:42fantastic tool. I think most people in
  75. 2:44development have used it for a long
  76. 2:46time. It's certainly the way to be able
  77. 2:49to set up environments that you can then
  78. 2:51use both locally and put into
  79. 2:53production, et cetera. But, generally
  80. 2:55Docker kind of containers are great for
  81. 2:58packaging up an app. They're not
  82. 3:00necessarily ideal though for agents.
  83. 3:03What Docker sandbox is is actually is
  84. 3:06sandboxes that we're going to be making
  85. 3:08is a micro VM. So, this is a small, fast
  86. 3:12VM with its own Linux kernel that's
  87. 3:15separate from yours. And one of the key
  88. 3:17things here is that this is all about
  89. 3:19the hypervisor. So, the hypervisor is
  90. 3:21basically a layer that creates and runs
  91. 3:24VMs. It sits between your hardware and
  92. 3:27the virtual machine, and it can hand off
  93. 3:29sort of like a slice of your CPU, your
  94. 3:33memory, et cetera, to the actual VM. And
  95. 3:36the key thing here is that this is
  96. 3:37hardware enforced. It's not just
  97. 3:39software, et cetera. And so, this idea
  98. 3:41of a micro VM is a fully contained
  99. 3:44solution that actually has more
  100. 3:47isolation to it than normal sort of
  101. 3:49containers. So, full VMs, they isolate
  102. 3:52things fine, but they can often be quite
  103. 3:54chunky, slow, takes time to spin them
  104. 3:57up, takes time to spin them down. The
  105. 3:59micro VM sits in the middle and gives
  106. 4:01you sort of real virtual machine level
  107. 4:04isolation, but boots really fast and can
  108. 4:07tears down really fast. And this is
  109. 4:09exactly what you want for agents. Now,
  110. 4:12inside each of those VMs, you've got a
  111. 4:15sort of Docker engine in there. You can
  112. 4:17install packages, you can run things,
  113. 4:19you can make a mess. And when you're
  114. 4:21done, you can just throw the whole thing
  115. 4:23away, and it won't have affected
  116. 4:24anything on your machine here. So, let's
  117. 4:27jump in and look at how we can actually
  118. 4:28create these, and then how we can
  119. 4:30actually set this up with something like
  120. 4:32a local agent on a machine, and let it
  121. 4:34run wild, and see what we can actually
  122. 4:36do where we're not having to pay for
  123. 4:38external tokens, we're not having to
  124. 4:39worry about stuff. We can just let the
  125. 4:41agent run, and then evaluate that at the
  126. 4:44end. Okay, so the first thing you want
  127. 4:46to do is actually set this up. So, to do
  128. 4:49that, once you've got it installed, and
  129. 4:51the instructions are pretty easy to get
  130. 4:53it installed on the different platforms,
  131. 4:55you want to come in here and just do sbx
  132. 4:57login. What that will basically get you
  133. 5:00is that will link this to a Docker
  134. 5:03account. And once you basically
  135. 5:05authenticate your account there, it will
  136. 5:07then authorize your system. Now, it's
  137. 5:09totally free, it's not going to cost you
  138. 5:11anything to do this. My guess is this is
  139. 5:13just Docker's way of enforcing
  140. 5:15enterprises to use paid accounts, etc.
  141. 5:18Now, once we've logged in, the simplest
  142. 5:21use of this is just to use it for coding
  143. 5:24agents. So, for example, one of the big
  144. 5:27issues you're going to have with various
  145. 5:29coding agents is that you don't want
  146. 5:32them going crazy and messing up your
  147. 5:34file system. So, you can see here, if I
  148. 5:37come in and I do sbx run codex, it's
  149. 5:41going to start up codex, but this codex
  150. 5:45is actually now running in the Docker
  151. 5:48sandbox here in this folder that I've
  152. 5:50called codex test. Now, if we come out
  153. 5:53and actually look at here what is
  154. 5:55running, you can see I can just do SBX
  155. 5:58LS and you'll see that sure enough I've
  156. 6:01got a number of different sandboxes
  157. 6:03here. The one that's running at the
  158. 6:05moment is this codex test with the agent
  159. 6:08codex in there. So, you can see that
  160. 6:10it's basically got access to everything
  161. 6:13in here. If I ask it to write me a read
  162. 6:16me with today's time but in the folder
  163. 6:20one up from this, you'll see that okay,
  164. 6:23it's able to go off and look like it's
  165. 6:25running the various sort of commands as
  166. 6:28it goes through this but you're going to
  167. 6:29see that it's actually sandboxed so it
  168. 6:32won't be able to write to this
  169. 6:34particular directory. In fact, it can't
  170. 6:36write to anything on the actual machine
  171. 6:38there except this folder that we're in.
  172. 6:40So, you can see if I go out and I
  173. 6:43actually go up to that directory, there
  174. 6:45is no read me in there. Yet it thinks
  175. 6:48that it's actually done it but it's
  176. 6:50actually been blocked when it was
  177. 6:51actually trying to do a read me there.
  178. 6:54But if I want to write something in this
  179. 6:56folder, like I want to actually do code
  180. 6:58and stuff in this folder, that will have
  181. 7:00no problems, right? It will go off, it
  182. 7:03will check what's in this folder but
  183. 7:05then it can write an HTML file, it could
  184. 7:07write a set of next JS files, etc. no
  185. 7:10problem in here. Okay, so you'll see
  186. 7:12that if we come out and we go to that
  187. 7:15folder, we can see that our index.html
  188. 7:17file has nicely been written there.
  189. 7:20And sure enough, if we look at it, we
  190. 7:21can see that it's exactly what codex
  191. 7:25wrote in there. So, this is the basic
  192. 7:27sort of security that the sandbox gives
  193. 7:29you is it stops agents or anything that
  194. 7:32you've got running in there being able
  195. 7:34to access other folders or erase things
  196. 7:37on your disk etc. And if I come out of
  197. 7:39the sandbox and I can actually go in
  198. 7:41there and see, okay, what network
  199. 7:44connections was it connecting to in
  200. 7:46here? Now, the first time you set it up,
  201. 7:48you will actually get to be able to
  202. 7:50choose whether you want your sandboxes
  203. 7:52to be open, fully closed, or balanced.
  204. 7:55Now, at any point, you can also reset
  205. 7:57that. So, if I come back to SBX policy
  206. 7:59and I select reset in here, it will
  207. 8:02first make sure that it's closed down
  208. 8:04all the different sandboxes that I had
  209. 8:07running. But, you'll see then I've got
  210. 8:08the option to basically select open, so
  211. 8:11I don't block any network traffic,
  212. 8:13there's no restrictions or anything. I
  213. 8:15can have it fully locked down where all
  214. 8:18network traffic gets blocked. But,
  215. 8:20probably most of the time you're going
  216. 8:21to want to do this balanced. All right,
  217. 8:23so let's make a completely new sandbox
  218. 8:25here. So, I'm going to do SBX run. I can
  219. 8:29do create, but if I'm going to do run,
  220. 8:30it's just going to create it and run it.
  221. 8:33I'm going to go for Claude this time,
  222. 8:35and I'm going to give it a name of
  223. 8:37testing CC. So, you'll see that it it's
  224. 8:40already downloaded the different sandbox
  225. 8:43files here. So, it was able to basically
  226. 8:46just get those going. Because I've used
  227. 8:49this before, it's already downloaded
  228. 8:50them. If you don't have them there, it
  229. 8:52would go through this. Now, first off,
  230. 8:54I'm going to need to do my standard sort
  231. 8:56of login. In this case, I'm just going
  232. 8:58to login with my account. All right, so
  233. 9:00I've gone through, I've done my login
  234. 9:02with the web, etc. And you can see it's
  235. 9:04basically got the bypass permissions on.
  236. 9:07So, it's running in dangerous sort of
  237. 9:08mode in here. What I'm going to do
  238. 9:10though is actually just exit out of this
  239. 9:13so that we can look a little bit about
  240. 9:14the network rules that were actually in
  241. 9:16there. So, to do this, we do SBX LS just
  242. 9:19to see what sandboxes we had there.
  243. 9:21We've already stopped this one, so we're
  244. 9:23doing this testing CC. So, SBX policy LS
  245. 9:28testing CC. Now, I can tell it that I
  246. 9:31want to see all the different network
  247. 9:33settings for this. And you see there's
  248. 9:34192 hosts basically in there. If I
  249. 9:38wanted to actually see them all, I can
  250. 9:40actually go through and see what's in
  251. 9:42here and what's approved and stuff like
  252. 9:43that. So, this is on the balance
  253. 9:45settings. So, it's set up for a generic
  254. 9:47use case across everything from ChatGPT,
  255. 9:51Cursor, OpenAI, and Anthropic. You'll
  256. 9:54have AWS in there. You'll probably have
  257. 9:56some Google APIs in there,
  258. 9:58gemini.google.
  259. 9:59You've got a variety of these things in
  260. 10:02there. Now, if you wanted to, you can
  261. 10:04actually come in and make your own
  262. 10:06network policy from scratch, so you can
  263. 10:09lock it down. The next thing I wanted to
  264. 10:11show you though is probably the bit that
  265. 10:12I think is more interesting than just
  266. 10:14the coding agents. The coding agents is
  267. 10:16really sort of rock solid for you to be
  268. 10:18able to do your day-to-day coding. But,
  269. 10:21if you're building agents, whether
  270. 10:23that's with something like deep agents
  271. 10:25or any of the agent frameworks that you
  272. 10:27want to work on yourself, you're often
  273. 10:30going to want to have your own sandbox
  274. 10:34for the agent. And in that sandbox, you
  275. 10:37can install packages, you can install
  276. 10:40anything that you need to in there. But,
  277. 10:43you want to basically limit where it can
  278. 10:46write and what it can write to. That
  279. 10:48it's just going to write to that local
  280. 10:50directory. So, the way we do this is we
  281. 10:53basically do run, but rather than
  282. 10:55putting Claude code or CodeX or open
  283. 10:59code or something like that, we
  284. 11:01basically just tell it that we want to
  285. 11:03do a shell. And this is going to give us
  286. 11:05a sandbox that is purely for a shell.
  287. 11:10And then also, I can use a directory
  288. 11:12which is a sibling directory to this,
  289. 11:13which is shell test. So, that should now
  290. 11:17create the new sandbox, set it up, and
  291. 11:20you can see now we are in shell test,
  292. 11:23right? So, I've got a whole new sandbox
  293. 11:25for this with an agent that I can
  294. 11:28install, and I could then install all my
  295. 11:31scripts in here, and then I can limit
  296. 11:33not only what it can read and write
  297. 11:34here, but also what it can access over
  298. 11:37the network. So, you'll see that if I
  299. 11:39just run a curl command here, I'm going
  300. 11:41to get told that this was actually
  301. 11:43forbidden in here. And you'll see if I
  302. 11:45come out of this sandbox, I can also
  303. 11:48test this, and we can see that okay,
  304. 11:50this example.com is denied there. It's
  305. 11:53not allowed for that sandbox. So, I've
  306. 11:55got that locked down in there. Now, if I
  307. 11:58want to allow it, I can just change the
  308. 12:00policy to allow the network on this
  309. 12:03sandbox to allow this URL on that
  310. 12:06particular port. And you can see that
  311. 12:08now the rule has been added to the
  312. 12:10policy. And if I check this again now
  313. 12:12and run it, you can see sure enough now
  314. 12:14it's allowed. So, the cool thing there
  315. 12:16is you're able to lock down and limit
  316. 12:18everything about what your sandbox can
  317. 12:21read and write. We could also set it up
  318. 12:23so that certain folders just have read
  319. 12:26access only, and then other folders have
  320. 12:29write access. So, that allows us to
  321. 12:31basically then set a bunch of documents
  322. 12:33in there that we want to be immutable
  323. 12:36that the agent can access, perhaps some
  324. 12:39things like that. But then they can't be
  325. 12:41overwritten. While we may have like a
  326. 12:43folder, which is like a scratchpad
  327. 12:46folder where it can write memories to,
  328. 12:48it can write use it as a full sub file
  329. 12:50system for writing notes to itself. The
  330. 12:53next thing we want to be able to do is
  331. 12:55look at how we would support keys. So,
  332. 12:58anytime I'm testing out a particular
  333. 13:00agent that's from GitHub or a new coding
  334. 13:03agent or something like that, I don't
  335. 13:06want to run it blindly on my machine. I
  336. 13:08want to be able to control what it can
  337. 13:11actually read and write to and what it
  338. 13:13can actually look at on the web. All
  339. 13:16right. So, if you want to set something
  340. 13:18like a secret in here. So, let's say we
  341. 13:20wanted to put it in a secret for the
  342. 13:23Open Router API key, right? And I don't
  343. 13:27really trust my agent too much whether
  344. 13:30it's going to try and exfiltrate that
  345. 13:32out or it's going to do something with
  346. 13:34it. I can come in here and set the
  347. 13:36secret. So, in this case, I'm just going
  348. 13:37to put Sam's open router secret in
  349. 13:43there, and it's basically been set in
  350. 13:46there. You'll see though, if I come back
  351. 13:48in here and actually look at the key in
  352. 13:51here, all I get out is that it's proxy
  353. 13:54managed, meaning that inside the actual
  354. 13:57sandbox, you can't see the raw key. You
  355. 14:01just see a placeholder, which gets
  356. 14:04passed out, and then as it goes out of
  357. 14:07the sandbox, it gets converted into the
  358. 14:10real key to be sent to open router. So,
  359. 14:13using open router would be fine, but I
  360. 14:16don't need to worry that, okay, the
  361. 14:18sandbox is going to be getting my keys
  362. 14:20and then sending them somewhere else.
  363. 14:22Now, of course, I could also block all
  364. 14:25the network access out apart from open
  365. 14:27router if I wanted to. There are a lot
  366. 14:29of different ways you can kind of lock
  367. 14:31this down. But, just knowing by default
  368. 14:34that you're able to basically do this
  369. 14:36SBX secret and set it, and you could
  370. 14:39also set it as a global key if you're
  371. 14:41going to be using it quite often for
  372. 14:42multiple sandboxes, etc. Okay, so there
  373. 14:45are a bunch of sort of pre-made
  374. 14:48templates that you can use to make
  375. 14:50sandboxes. So, for example, I showed you
  376. 14:52the Codex one. I showed you the Claude
  377. 14:54code one. There are also things like
  378. 14:56open code and a number of different
  379. 14:58things. But, if you want to make your
  380. 15:00own sort of templates, Docker's actually
  381. 15:03created a system to do that, and that's
  382. 15:05called kits. So, I'm not sure if this is
  383. 15:07in its fully worked out final version.
  384. 15:10You can see they've listed this as still
  385. 15:12early access, but anyone can access
  386. 15:14this. And what this basically does is it
  387. 15:17allows you to set up tools to install
  388. 15:21the environment variables, credentials,
  389. 15:24network rules, all these kinds of things
  390. 15:28to be able to make a kit. Now, kits can
  391. 15:30do a whole bunch of different things.
  392. 15:32They can install things and create the
  393. 15:34environment for you. They can also
  394. 15:36basically set up an app and run the app
  395. 15:39for you. Now, here is an example of a
  396. 15:41kit that I made for a deep agents agent.
  397. 15:45So, if you know deep agents from
  398. 15:47LangChain, it's basically a framework
  399. 15:49that allows you to build agents that
  400. 15:51both have access to file systems, have
  401. 15:54access to tools, all those kinds of
  402. 15:56things. Now, if you look in here, this
  403. 15:59is going to basically inherit from a
  404. 16:01shell, so it's going to be basically
  405. 16:02just be a shell kind of sandbox, but
  406. 16:06it's going to have a bunch of properties
  407. 16:08that I am setting in here. So, I only
  408. 16:11want this to be able to contact open
  409. 16:13router and LM Studio. So, you can see
  410. 16:16that it's basically set up for the
  411. 16:18network to just allow open router and
  412. 16:22open router on 443 and localhost on
  413. 16:251234, which is the LM Studio. Now, it's
  414. 16:28also got some other things in there to
  415. 16:29be able to allow Linux updates, to be
  416. 16:32able to install PyPI packages, etc. But,
  417. 16:36you can see that it's denying OpenAI,
  418. 16:39ChatGPT, all the typical sort of things
  419. 16:41that we had before.
  420. 16:43We can also set up that it's going to
  421. 16:44need some credentials, which are going
  422. 16:46to be open router, and that I'm going to
  423. 16:48set globally. So, that's going to be
  424. 16:51injected in via the proxy, right? So, I
  425. 16:54don't need to set any of that in here.
  426. 16:56If I wanted to, I could actually put my
  427. 16:58key in there, but it would kind of
  428. 16:59defeat the purpose, right? And then you
  429. 17:01can see once this gets created, it's
  430. 17:04going to install Python. It's also going
  431. 17:06to set up a virtual environment in
  432. 17:08there, and it's then going to pip
  433. 17:09install a bunch of packages like deep
  434. 17:12agents, LangChain, LangChain OpenAI, so
  435. 17:15we can use LM Studio's Open AI endpoint
  436. 17:18in there and then LangChain Open Router
  437. 17:21in there. Now, if I wanted to make it
  438. 17:23for Gemini or for something else, I
  439. 17:24could certainly add that there. I've
  440. 17:26also got then the actual code that is
  441. 17:30going to run once this is all installed
  442. 17:33in here. So, this is going to be just a
  443. 17:35super duper simple little agent, which
  444. 17:37is basically a chat. There's no real
  445. 17:41tools here. There's nothing all like
  446. 17:42that. But, if I wanted to I could put
  447. 17:45all of that in here if I wanted to have
  448. 17:46something like that going on. And then
  449. 17:49I've got a readme of just basically how
  450. 17:50to set this up. Okay, so now that I've
  451. 17:53built that, that's what's called a kit,
  452. 17:56right? So, all the code that I was
  453. 17:57showing you there is a custom kit that
  454. 18:00I've made for deep agents. To actually
  455. 18:02set this up now, what I'm going to do is
  456. 18:05I'm going to run SBX run deep agents.
  457. 18:08I'm going to basically tell it the
  458. 18:10folder that I want it to create in. So,
  459. 18:13I'm actually in a folder called my deep
  460. 18:15agent here, right? So, that's what the
  461. 18:17dot is there. Then I pass in the URL to
  462. 18:20the kit, right? So, that kit is under my
  463. 18:23Docker sandboxes and there's the deep
  464. 18:25agents kit there. You'll see that when I
  465. 18:28run this the first time, it would
  466. 18:30download any images etc. that it needs
  467. 18:33to do that. In this case, because
  468. 18:35they're shell, I've already got them.
  469. 18:37I've already used this for other
  470. 18:38projects etc. It doesn't need that. What
  471. 18:41it is going to do though is that it's
  472. 18:43going to set up the actual folder. It
  473. 18:46needs to install Python. It needs to
  474. 18:48install those packages. It needs to
  475. 18:49create the virtual environment. So, you
  476. 18:51will find that it will take a minute or
  477. 18:53a couple of minutes to actually get this
  478. 18:55going the first time. Sure enough, it's
  479. 18:59just done. Hopefully, you saw all of
  480. 19:01that that it basically set it all up and
  481. 19:04then it has run that script that we saw
  482. 19:07before that was setting up a deep agent
  483. 19:09in there. And you can see that okay,
  484. 19:11this is what we're actually running. We
  485. 19:13can see if we chat to this, because
  486. 19:17we've already got our open router set
  487. 19:19globally,
  488. 19:20the deep agent assistant is able to use
  489. 19:23that. It's actually proxying through and
  490. 19:25using it. So, if I run this off, I
  491. 19:27should be able to get it so that it's
  492. 19:29talking to deep seek version 4 flash
  493. 19:33latest. Because it should enough it's
  494. 19:34saying, "Hi, I'm your coding assistant
  495. 19:36ready to help out." Let's see. Now we've
  496. 19:38got everything locked down, so it
  497. 19:40shouldn't be able to do any sort of
  498. 19:42searches or anything like that. Let's
  499. 19:44just try this out. Okay, so I'm asking
  500. 19:46it, "Can we search Google for the latest
  501. 19:48AI news?" And even if it's going to try
  502. 19:51and ping one of the URLs there, it's
  503. 19:54going to come back and it's just saying,
  504. 19:57"Look, I'm sorry, but I don't have the
  505. 19:58ability to search the web. Here's what
  506. 20:00we're working with." So, the file
  507. 20:03systems is actually limited in here.
  508. 20:05That's what we put in there. What we can
  509. 20:08do, you can see network access says, "In
  510. 20:10this sandbox is restricted to just open
  511. 20:13router.ai
  512. 20:15and local LM Studio." So, it can't get
  513. 20:18out of the sandbox in here. If I ask it
  514. 20:20to give me a list of files in users,
  515. 20:24it's going to go through the same
  516. 20:25process and realize that even though
  517. 20:26this time it's got reading tools and
  518. 20:29writing tools and editing tools, even
  519. 20:32though it's got those tools, you can see
  520. 20:34here that it basically found out that
  521. 20:37there are no files accessible in this
  522. 20:39environment at all, cuz we've just set
  523. 20:40up the environment, right? So, it says
  524. 20:43that it checked users found it empty
  525. 20:45{slash} all these things. Really, it
  526. 20:47doesn't have access to any of those on
  527. 20:49my Mac, so it can't find them. It can't
  528. 20:52do anything with them in here. So, you
  529. 20:55can see this is how I can lock this
  530. 20:57down. At any point if I want to get out
  531. 20:59of it, I can just exit just like normal.
  532. 21:01And now that I've got set up, I don't
  533. 21:03even need to refer to the kit or
  534. 21:05anything again. If I want to run it, the
  535. 21:07way it's set up is that it's using the
  536. 21:09kit name plus the folder name to create
  537. 21:12the actual name of the sandbox in here.
  538. 21:14But, you can see that now I've got that,
  539. 21:16I can run this and it just goes straight
  540. 21:18into it really quickly. So, I don't need
  541. 21:21to worry anything about it having to set
  542. 21:24everything up again each time and stuff
  543. 21:26like that. I can now just go in and I've
  544. 21:28now got this deep agents agent in a
  545. 21:32totally secure sandbox where I could
  546. 21:35have it running lots of different tools,
  547. 21:38having a scratch pad, having the ability
  548. 21:41to write things into its local file
  549. 21:43system, but not having to worry about it
  550. 21:46going and messing up things from my
  551. 21:48entire computer, etc. So, just to finish
  552. 21:51up, I would say Docker sandboxes is
  553. 21:53really something you should be using on
  554. 21:55any machine where you want to confine an
  555. 21:59agent, whether that's a coding agent,
  556. 22:01which is the sort of most common
  557. 22:03examples that they're showing out there,
  558. 22:05but also custom agents. If you want to
  559. 22:08build a custom agent and you want to
  560. 22:10make sure that it's locked down, that
  561. 22:13you don't have to worry about it doing
  562. 22:15stuff. And the cool thing is just like I
  563. 22:16showed you there, I can have that deep
  564. 22:19agents agent just talking to LM Studio,
  565. 22:22so it can still use the local model
  566. 22:24that's on my machine. I could give it
  567. 22:27access to something like Tavily or to
  568. 22:30DuckDuckGo search. I could give it
  569. 22:32access to certain websites that I wanted
  570. 22:34to pull information from, and I could
  571. 22:36just run that 24/7 not having to worry
  572. 22:40about is this going off the rails and
  573. 22:43suddenly starting to wipe things on my
  574. 22:45drive or running up a huge bill, etc.
  575. 22:48Because in that case, the model would be
  576. 22:50totally local, etc. So, we all know that
  577. 22:53security is a key issue with agents.
  578. 22:56This basically just solves a lot of the
  579. 22:59problems in a very simple and elegant
  580. 23:02way that you can use for a variety of
  581. 23:05different things, whether that's coding
  582. 23:06agents, whether that's your own agents,
  583. 23:09etc. So, let me know in the comments if
  584. 23:10you've checked this out. All the links
  585. 23:12for all of this will be in the
  586. 23:13description. It's very easy to set up.
  587. 23:15You can try it out yourself. And let me
  588. 23:18know in the comments what you think.
  589. 23:19Anyway, as always, if you like the
  590. 23:21video, please click like and subscribe,
  591. 23:23and I will talk to you in the next
  592. 23:24video. Bye for now.

About this transcript

This page contains the full transcript of Docker Sandboxes - Safe and Secure Agents by Sam Witteveen, generated from the public captions YouTube serves with the video. The transcript has 4,421 words across 592 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.