text
stringlengths
0
2.46k
**Brigit Murtaugh:** Yep, for sure. And yeah, you can take it as inspiration, you could use it as your actual dev container, you can add things to it over time... And you'll see as well, we also publish a set of images, so those are going to be referenced in like our templates, for instance... And so you can kind of ex...
**Adam Stacoviak:** And essentially, you're spinning up a Docker image if you're doing local environment stuff. So if I'm doing this locally, this lets me set up a Docker image that has this environment baked into it; when it comes to using VS Code or a different text editor, whether it's Vim or whatever, you have port...
**Brigit Murtaugh:** Yeah. So essentially, everything you're doing is living in that container, you can view it as... So you could view it as kind of our model for remote development and VS Code in general; like, you're really working in that remote environment, whether it is a dev container, whether it is the Windows ...
And what's cool with Dev Containers too is there's a variety of ways that you can reference what you want to be set up or configured... So like you were saying, you could reference a Docker Compose .yaml, you could reference just a Docker file, you could reference just an image. It really depends on just like what you ...
**Adam Stacoviak:** So what happens whenever I spin that image down then? So if my code lives in there, my commits are in there, does this thing have the keys to my GitHub, essentially? How does that go one layer further? How am I building inside this container, and how is it ephemeral, can go away, but yet, I'm not lo...
**Brigit Murtaugh:** So yeah, essentially with containers you have a couple of options, where either you can mount your source code into the containers, you can use a bind mount or you can use a volume... We have an option, for instance, in the Dev Containers extension where you can clone a repo into a volume. And so v...
**Adam Stacoviak:** Sure.
**Brigit Murtaugh:** ...yeah, I don't know if that's helpful.
**Adam Stacoviak:** Well, I just think of like the resistance. I've gotta imagine part of the pushback is this confusion, I would say... So I'm asking you to clarify, because I think there's a lot of -- at least it's confusing for me. So I would imagine if I'm typically -- I'm Jerod; I love my local machine. I don't mi...
**Jerod Santo:** \[50:06\] Oh, yeah. All things.
**Adam Stacoviak:** But then you go to the container, and it's like "Well, where does my code live?" Sure, I understand volumes, and understand binding... And if I'm developing in that container, is the code in that container? Is it still in the local repository? Does it simply just run the mirror image version of it, ...
**Brigit Murtaugh:** Yeah. Right. And so yeah, if you have - like you mentioned, if I'm making commits, or something like that, they're not gonna be like "Oh, these are just special commits that then got discarded outside of my container", or something like that. It's like, no, you can commit back to your GitHub repo, ...
**Jerod Santo:** How do the credentials work? So if I'm logged into github.com, I'm looking at an a repo, I opened it in a Codespace, now I'm logged into JerodSantoFictionalJourneyP775G6 etc.
**Adam Stacoviak:** Is that the URL?
**Jerod Santo:** Well, that's part of the URL. It's a fictional journey... It's my current Codespace. And let's say I'm just hacking along inside my Codespace, and I say, "Alright, I'm going to commit this code, I'm going to push it back to my repo." How does it know it's me? How are my security credentials injected in...
**Brigit Murtaugh:** Yeah, so with Codespaces -- so you can use Codespaces in the browser, or you could use a Codespaces extension in desktop VS Code. And either way, Codespaces is going to handle your GitHub off. So it's up to the Codespaces extension or service to securely let you log in, and make sure that it's real...
**Adam Stacoviak:** Right. Speaking of that, are you 2FA to GitHub, Jerod?
**Jerod Santo:** I feel like you're social-engineering me right now.
**Adam Stacoviak:** I mean, I want to know, because at this point you're outing yourself to be maybe insecure, potentially. So get secure, if you're not 2FA-ed.
**Jerod Santo:** I'm not going to answer that question.
**Adam Stacoviak:** Okay.
**Jerod Santo:** So if you are working locally in VS Code, inside a dev container, the code is in the container, right? And you mount it locally somehow, VS Code handles whatever dance that is, and then as long as it has local credentials for SSH, or however you're authing against your remote origin, whether it's GitHu...
**Brigit Murtaugh:** Yup. And you can use the same -- like, if you're using Git or GitHub commands via a terminal, or via extensions in VS Code, then you can install or use the same ones in your container, and get that same access and authentication.
**Jerod Santo:** Okay. It's almost too good to be true, Adam.
**Adam Stacoviak:** Almost.
**Jerod Santo:** Too good to be true. Is it not true? Because usually, when it's too good to be true, it's not true. Going back to these templates... So I'm looking at the Go one now in the official Dev Containers Templates repo, the Go template... And there is no Docker Compose, there's no Docker even in the template....
\[54:14\] So I guess Microsoft is hosting a bunch of these images for people. And if you don't specify anything, like a specific image URL or a Docker file that grabs an image itself, it's just all falling back to Microsoft hosted stuff? Am I reading this right?
**Brigit Murtaugh:** Yeah, so the set of templates that we host as part of the spec are all going to reference images that we're also publishing as part of the spec. So if you go to github.com/devcontainers/templates or /images, you'll be able to see the corresponding templates and images that we're publishing. And in ...
**Jerod Santo:** Right. I love that; it's sensible defaults. You're actually providing a service here, right? Like, you're providing an image repository that people can download images from, in the case that they don't have their own, or pointing at Docker Hub, which is what many images currently hosted on Docker Hub o...
**Brigit Murtaugh:** Yep, exactly.
**Adam Stacoviak:** I mean, who doesn't want to have a Go machine one click away, essentially? I mean, that's how you get there's, is this. We just had that conversation with Matt, basically; we were talking about that though, we were just like saying how allergic we are to just rando installs to different things, and ...
**Jerod Santo:** Yeah, it's already set up. Yeah
**Adam Stacoviak:** But if you're Go-curious, like "How does this work?", you can just spin up a Go container via Dev Containers, play around, and your local machine is the same as it was when you closed that machine down, when you closed that container down. It's right there... Which I think is super-cool. I just love...
I guess the really interesting thing is when it goes beyond us nerds, right? We geek out on this stuff, right? This is great to us. But what about when my son, who's seven, is at school, and he wants to go into this class, which he's now in some G&T classes, and they're doing computer things... Well, I don't know if it...
**Brigit Murtaugh:** Yeah, I love that you brought that up too, because education is the space that we've really identified too that these could be super helpful in... Especially in some of the more cloud-powered or automated tools like Codespaces, or other ones. I don't even have to like install anything locally, I ca...
\[58:18\] I think that's an awesome opportunity in education, because we've gotten feedback from educators and students alike, that "Hey, at the beginning of a new semester I have to spend the first few days or weeks just getting everything I need for this class. And if I'm maybe studying computer science, I have a bun...
**Jerod Santo:** That's music to my ears.
**Adam Stacoviak:** For sure. It's also roots from the original GitHub inception, which was permission to mess up. Like, this is the ultimate permission just to play, right? If I'm Go-curious and this Go container is one devcontainer.json away, Jerod, as you said before - that's so cool! Just one devcontainer.json away...
A semi-tangent - I've kind of played with this in a different world. I've been tinkering with Proxmox, and containers, and stuff like that, and I'm doing a lot of homelabby stuff... And I've been playing with TrueNAS, and other things, more so because Proxmox makes it so easy to spin up a brand new Ubuntu image, or a D...
**Brigit Murtaugh:** Yeah, absolutely. That's what we're hoping for, to make it just that easy.
**Jerod Santo:** \[laughs\]
**Adam Stacoviak:** Jerod is out here laughing. Come on, Jerod...
**Jerod Santo:** Well, Brigit, you turned us into salespeople for you. He's like "It's just that easy!" \[laughter\]
**Brigit Murtaugh:** Yeah, I love it. Like, within an hour. I'm like "Oh, I don't even have to be saying what are the pros there, or anything like that."
**Jerod Santo:** We're converted. We're converts.
**Brigit Murtaugh:** Thank you.
**Adam Stacoviak:** Brigit just sits back and lets us get excited about it. She's like "Yes, we've got'em!" This is your adoption strategy, isn't it?
**Brigit Murtaugh:** It works...! \[laughs\]
**Jerod Santo:** This is good.
**Brigit Murtaugh:** Yeah. You've just got to find the right podcasts...