you’ve been using Docker WRONG!!

Video Notes:

Start using Docker the RIGHT WAY with Linode: Sign up using my link and you will get a 100$ credit that is valid for 60 days 

STOP using Docker the hard way! Make your life more delightful by using Portainer. This is going to be your best friend when it comes to managing Docker environments no matter where they are. Docker Networks? Simplified. Deploying new Containers? Easier than ever. Managing containers deployed with Docker Compose? Never been easier. Get started with Portainer RIGHT NOW!


🔥🔥Join the NetworkChuck Academy!:

0:00   ⏩  Intro

1:25   ⏩  Which Portainer deployment is right for me?

3:24   ⏩  Time to install Portainer!

5:18   ⏩  No more CLI…. Time for the Portainer GUI

7:35   ⏩ This part is going to be really hard!
8:25   ⏩  How to manage other Docker environments ft. Abbey

11:02 ⏩  Things to look out for in Portainer

11:59 ⏩  Outro

Docker can be a little hard, right? I mean, I’ve had to make three videos just to explain how to do stuff with it, but throw those videos out. We’ve been doing things the hard way. I can’t believe I wasn’t using this tool before. It’s a beautiful web gooey that makes deploying and managing Docker. Not only stupid, easy, but delightful. I wanna show you how to install and start using Porter and get this it’s free and really, really easy to set up. I mean, you’ll be up and running in like 30 seconds. The 

Coolest feature is that you can use Porter to manage all your Docker containers across all hosts, no matter where they are. So don’t miss me, showing you how to set it up later in the video and thank you to Le node for sponsoring this video. 

So this is kind of weird, but Porter itself is a Docker container concept, which makes it pretty easy to deploy anywhere. Literally you can put it on a raspberry pie, just not this many. It can be WSL. It can even be on the computer you’re using right now. Anywhere you can run a Docker container it’ll work. And because you can run Docker pretty much anywhere you don’t need anything. You’re good. Except for coffee. You always need coffee for everything in it, right? Never check, do coffee and make sure you hack that YouTube algorithm. Have you done that yet? Today? You gotta hit the like button notification. Be comment, subscribe. You gotta hack YouTube today. Ethically of course now the good news is that no matter where you put it, the installation steps are the same. So whatever you got, feel free to follow along with me right now. 

That’s kind of a tongue twister. Now for me, I’m gonna installer in the cloud with Linode. Now I’m doing that because it allows me to access all of my containers across all environments, no matter where they are. And yeah, even my home lab behind my firewall. Now Porter has two elements, the Porter server and the Porter agent, but you won’t always need both. For example, if you just have one host, one server or one laptop, one computer running your Docker containers, all you’ll need is the Porter server we’ll install and run the Porter server on that one host and it will automatically start managing your existing Docker environment. That’s it. The agent comes in when you have remote host, you’ll install the Porter agent on that remote host, which will allow your Porter server to manage that sucker. Again, Abby’s gonna show you how to do that here in a bit. So stay tuned. So to put it simply, all you’ll need is just one. Computer can really be any computer at all. As long as it can run Docker, which will install Docker on that sucker. And once it has Docker will then install Porter. So I’m gonna head out to Chuck to get my cloud VM set up. 

Actually I’m gonna deploy 

It. So Leno is what I’d use for pretty much all my lab stuff and my work stuff. It’s how I run my business. Whenever I need to test anything, Leno is always my first stop because I can quickly spin up a VM and just like a few seconds. And it only cost me like 0.0, zero seven, 5 cents per hour. Choose, choose the cheap one. There we go. The node one gigabyte. Now, if you are gonna lead this up like me, cuz it is Porter. I wanna manage my stuff all the time. We’re talking like five bucks a month. That’s it. But if I were just testing something real quick, which I do like every single day, I would just spin this up and then delete it. If I only had it up for an hour, it costs me 0.01 cents per hour. That’s pretty cool. Um, <laugh> you gotta name it. That’s good. It’s good. Was that password 1, 2, 3, 1, 2, 3, 5, 3, 8, 9. Click that box so I can log into it. Just create, just click create 

I’ll SS H 

No. The one above that. 

<laugh> also, if you’re new to ode, check out my link below and you’ll get a hundred dollars credit for 60 days making this lab 

Free. She did a pretty good job, huh? So I’m gonna S the station into that box real quick. And if you’re not using a Leno cloud VM, make sure you have your terminal setup and whatever you’re using. And this will seriously take about 30 seconds. So quick coffee break and zoom through this. 

And here we go. First, let’s update a repositories. Nick, put the time in the clock somewhere pseudo a PT update. That’s it. Cock break done. Now let’s install Docker. If you don’t already have it pseudo a PT install, dash Y. Ready? Set. Go. Cock break. Okay. Docker is installed. Now let’s run a quick container just to make sure it is working and running. So we’ll do a Docker run. I’ll do a switch. It D expose some ports for 80 to 80 and we’ll do the engine X image. Ready? Set, go. And done. Seems like everything’s working. Let’s do a Docker PS to make sure it’s there. There he is right there. So Docker’s good. And now we only have one thing to do install Porter, which itself will be a Docker container, which is pretty cool. Now, before we run the container container, we’re gonna create a Docker volume. 

This volume will contain all our container information, keeping it persistent, one easy command, Docker volume creates, and we’ll call it container stuff, underscore stuff. And now with one command, we’ll deploy our Porter container. <laugh> here in Docker. Now all commands will be below. So I’m gonna copy and paste mine right now. There she is a few things going on here. You want to pay attention to first, we’re exposing ports 9, 4 43 and 8,000. Remember that? And then we’re doing two cool things with volumes first with a dash V command we’re mapping some Docker specific things to Porter so that you can access your existing environment on that local host. You kinda want that. I think you want that. And then we’re also mapping that volume that we just created to keep our Porter data persistent. Now that’s enough talking. Let’s run the sucker enter and go done. 

Was that 30 seconds. I’m gonna believe it was 30 seconds. Let’s do a Docker PS to make sure it is there, there ISER. And that my friends is the last time you’ll ever, ever, ever have to run Docker via the CLI. You’re done. Forget all those commands. You don’t have to think about ’em anymore. Probably not, but you’ll use them a lot less. So let’s actually see AERs working. Let’s access that beautiful, delightful, delicious web gooey. I have too much coffee. So as I mentioned earlier, I told you to remember the ports we’re exposing. And one of those ports we’re gonna pay attention to is port 9, 4 43. That’s how we’re gonna access the stuff. So I’ll navigate to the IP address of my personal machine in the cloud with ode, I’ll go to port 9, 4 43 and gotta make sure I specify HTTPS. Woohoo. When things are happening, let’s proceed past the unsafe, scary messages and Porter is loading. 

I’ll zoom this up. Not like most things you wanna set up your username and password, do something secure and then tell it not to watch you and then click on create user. That’s it <laugh> that’s done. All we’ll do right now is just click on the get started whale right there. You are now managing your Docker environment and Porter. So your installation is complete and you probably are like, wow, I want to just click around and play with all the goodies. And you know what? Go ahead and do that. But if you wanna hang with, with me just for a little bit and have a few extra sips of coffee, I’ll show you a few things just to get you started. And also don’t forget if you wanna access remote Docker environments with the agent. Abby’s gonna show you that here in a moment, but here real quick, notice the environment is giving us a scary message. 

None selected that’s cuz we don’t have one. Well selected. Let’s go and select our local guy right here. This is our local machine where Porter is running. Bam. Whoa, did you see that? We just got a ton of cool new options on the side here. Things you might recognize, like, uh, I don’t know, containers. <laugh> images, networks, volumes. Not only that we got a pretty little dashboard right here. Ooh. I love it so much because yes, Docker is cool, but it’s like when you deploy, when you’re like, okay, I don’t really see it. How’s it going? I don’t know. I can do a Docker PS, but it feels kind of like weird. This gives you a window. You can see everything. I love that. And pretty much everything you can do in the Docker CLI you can do here. And it’s a little bit easier. 

You don’t have to remember all the switches in the syntax. Now if few cool things, let’s jump into containers real quick, click on that, uh, stuff right there. And there’s our containers. And honestly, for a second, I thought that said thirsty Elon <laugh> I wish it did. Now from here, you can do pretty much anything you want. Start, stop, restart your containers. But what’s also cool is notice this little icon right here. That’s a terminal icon. So right here inside container, I can click that icon, click connect and I’m just inside my container, just like that. And my web browser that is stinking powerful. I love this. And let’s disconnect. It’ll cleanly back out. If I use my breadcrumbs at the top and get back, they’re all still running. They’re cool. They’re beautiful. Now, before I set you loose and you go crazy with this, what do you say? 

We create a container. Let’s just walk through a basic container config. I’ll click on ad container right here at the top. We’ll name it. And the rest of this is just so much fun. Like for example, you can search Docker hub from right here. So maybe I wanna install Cali. I can just simply search it. There it is. I’ll jump in there and copy that. Put that here. As I scroll down, I can do some port stuff. Let’s publish a network port right here on the host. Let’s say it’s 8, 4 45. And on the container, it’s 71, just making up stuff. But you can do that just like that. Or you can click on expose all ports to random host sports, which is pretty cool. You can do access control, which is powerful. We can do auto remove and we could be done at this point, but we got more options. We can do volumes. We can do networks, restart policies. I mean just, we can do everything from right here and it’s nice and pretty. I let’s do, uh, interactive and TT Y console as well. Okay. I think I’m good. I’ll deploy real quick. Deploy done. There’s thirsty Musk right there. Let’s get into his command line. Connect Cally, Lennox, just like that. 

Now the part you’ve been waiting for how to install the edge agent again, this will allow you to manage remote Docker environments from your Porter server. So first we’re gonna go look at environments. Where am I at? Whoa, I started really high <laugh> 

Beep beep 

The joke. What are you 

Doing? Try to circle it. Just click on that. The environment’s right there. And then click add environment. Beep from here, we’re gonna click on Docker, which is little halfway with blocks and scroll down and click start wizard. 

Watch out, babe. Now here you have two options for an agent. The default agent. He’s pretty cool. And what he’ll do is just sit there and wait for your Porter server to talk to him. The problem is that if your Porter server is in the cloud, like mine is with Le node. You’re gonna have to open up ports on your home network and your firewall to enable the Porter server to reach this guy. So if you’re dealing with environments that are behind a firewall are not locally reachable from your Porter server, then you might wanna consider the edge agent, which is what ABB is gonna show you how to do 

Right now. We’re gonna click on the edge agent and scroll down. We’re gonna name the environment, our house. You can leave the port Tanner server the way it is. There are more settings if you need them, but we don’t need ’em right now. So we’re gonna click on create, okay, now we’re gonna click on Docker standalone and we are gonna copy this code. Then we’re gonna paste this in a remote environment. So now we’re gonna paste and hit enter, right? Yeah. We’re gonna hit enter. Oh, we need some pseudo. So I’m gonna hit the up arrow. I’m gonna hit control a to get to the beginning of the command and then I’m gonna type in pseudo space, enter it’s downloading and we’re in. 

We’re not in you still 

It’s running. It’s installed back at Myer. <laugh> <laugh> what’s 

Happening. She’s doing a good job. Huh? So now Abby just showed you how to install the agent. Um, with that command we generated from Porter. It should automatically be connected now without having to expose any ports, then you do a great job. Okay? So here notice that we do have another environment. It looks a bit different and the status is heartbeat, but because it’s green, I’m gonna assume that’s a good thing. And I think it is if I jump in there, boom, there’s my remote environment. My 15 containers <laugh> which is awesome. I can restart any one of these. Let’s do, uh, Callie here. Restart him, restart. So cool. Let’s see if I can actually access him. So let me, uh, click on the console connect. <laugh> that is so cool. I am accessing a Cali Lenox box from my Clouder to my home lab. 

That’s amazing, right? No port’s exposed. So Porter is incredibly powerful. I’m not gonna go over all the features right here, but some things you might wanna look out for, for example, <laugh> a lot of the stuff I’ve covered in my videos. You can do easily here networks. You can create networks crazy easy. Um, another one is stacks. Stacks is their name for Docker compose. So if I jump in there real quick notice, I already have a stack there. And it’s actually from my current environment, my home lab, I already had a Docker composed template deployed and notice I really can’t do anything to it, which I don’t like. I wanna manage it all from Porter. So I’m gonna go to that host real quick. I’m gonna stop it. And with that gone, if I refresh it actually should show me here. It’s gone. Now I’m gonna add a new stack. 

I’ll call it stacks on stacks, on stacks, on stacks, on stack. Okay. That’s that’s enough. I’ll use my web editor or I could upload a file. I’m just gonna paste the file right here. The massive composed file used in the previous video and then click on deploy stack. That’s it. So now I’ve deployed like I think 14 containers with one command, one stack and I can see them all here and I can manage it right in Porter. And it’s beautiful. And I love this and it’s my favorite thing. Now that’s Porter. Isn’t it amazing. I love how it makes Docker more approachable to people with Porter. You can do a ton of stuff with ease. So let me know what you think. Are you going to deploy Porter in your lab or do you use something else? And let me know how Abby did. Do you wanna see more of Abby on the channel? I think she has a, a flare for teaching. We’ll see how she does.

Check Out Network Chuck's Coffee and MERCH Shop