Docker Desktop for macOS Setup and Tips

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
this video is from my docker mastery course on udemy and i've pulled this section of videos on installing docker desktop and put them into a playlist here on youtube you can get all the details in this series of videos look for the playlist somewhere in this interface on mac windows linux both desktop and server for my preferred way to install docker desktop and learn docker and kubernetes locally on your machine you can get course discount coupon links below the discord community i have for all things devops my podcast live show everything else get those links below and i hope you enjoy mac os and docker it's what i've been using since docker desktop came out five plus years ago and i'm going to walk you through the setup and a few tweaks you might want to check out in this video very similar to the windows one we have a few steps we need to go through in mac we don't have to worry so much about bio settings or virtualization and all that it just tends to work that's great and then we have a linux shell or a bash and zsh type shells already in mac so a lot of the requirements for docker are just to install it it just works as long as your mac is i don't know at least less than five years old at this point five six seven it probably goes back as long as you have one of the last two or three major os's docker tends to support multiple versions of mac going back in time so you should be fine there and i'm mentioning docker desktop because it is i still think the best way on mac to run docker there are lots of other options out there but they all have a subset of the features and functionality that docker desktop gives you so i'd recommend you just stick with the best and with mac you really only get two options here you're either on an intel mac or an apple m1 silicon processor so apple silicon arm m1 whatever the term is you want to use for it if you're using one of those just make sure you don't download the intel and you download the m1 version or it may not even work and of course like every other mac app when you download them from the internet is a dmg you just take that little app over there and you copy it into the folder i'm in and as a reminder docker desktop is always free for learning now there's tons of open source throughout this course nothing in this course you have to buy there's nothing in here that you should have to pay for other than the computer you're running it on and docker desktop does have an enterprise tier where you will need to pay for it in an enterprise setting for corporate use but in this case we are specifically using it for learning and i've gotten permission or verification from the top management at docker that that's the intention is that it's free to learn free for individual use and freeze for small business it's only once you get into the enterprise you need to pay for it so even if you work in one of those big enterprises and you want to use docker desktop for learning then you're safe you can read through the user license agreement but you're going to come to this screen which is to accept the license and you can read through there it's mostly to alert you to the licensing change that docker did a while back that requires enterprises to now pay for it and docker likes to bring up its dashboard when it's starting and this is a gui that allows you to do some of the things in docker without having to use the command line although we will focus largely on the command line in this course but once it's starting up you'll see this screen and you'll notice the orange below that means that docker or kubernetes which you can enable in here and we'll do that later in the course these tools will need a startup time because in the background they're starting a little vm inside of mac to run a linux kernel mac doesn't run a linux kernel it runs a slightly different kernel based on bsd and that's not really compatible with docker we really need a linux kernel running in a little vm so docker creates a nice lightweight low energy usage vm which you can also pause from the menu and when it's finally started this little bar down here will go green and you'll see some stuff over there and you'll notice a new icon up here in the menu at the top hello and you'll notice this is the docker logo it is actually moby he has a name he also has a pink whale named molly which you'll probably hear trivia about throughout this course but this is the little icon you need to pay attention to because it's a quick access to the dashboard to log in to change the preferences to pause it when you're not using it and then to quit it when you're done and in that menu or in the full dashboard you'll want to create a free docker id at hub.docker.com and log in there create that account get the account id and password the account id is not your email address it is your account id login to docker so when you do that in docker desktop docker needs to pull the software we're going to run it's much like a download or like a get clone or get pull it's going to copy that stuff down off the internet and you have a number i think it's somewhere around 100 per 6 hours that you can download and you probably won't download that many in this course but if you're on a corporate network that corporate network might have everyone using the same ip to get to the internet and that's what docker's tracking for downloads so log in with the free account it'll give you more downloads per every six hours or whatever their algorithm is and that just makes sure that you won't get a download limit exceeded when you're trying to download apps to load for the rest of this course now docker has some built-in first steps you can feel free to do those in this screen here that you're seeing on the dashboard but you bought this course so you can also just ignore all of that close down the dashboard just click the little red dot in the top left get rid of that and then bring up your terminal because that's what we're really going to use a lot in this course for learning docker then compose and kubernetes and all the things here's a few tweaks and setting changes you might want to do not just for this course but for general use this is typically what i change on mac when i've installed a fresh docker desktop i want to go change this stuff once you go into preferences and you should see the resources area that will allow you to control the number of cpu ram disk swap all these settings in mac the defaults will get you started but typically when you start to run more advanced multiple container workloads that we'll learn later in the course you might run out of memory and you might even run out of disk space down here at the bottom so consider moving these to somewhere higher i tend to run at least half of the ram i have in the system it just depends on how many resources you have when you start to feel like docker is not working or getting slow you might want to come in here and see if you need to raise these limits and don't worry if docker is not using them it won't use them it won't hog these resources or reserve them the disk itself over here actually limits its size to just the files it's using so you can feel free to ratchet this up i tend to go 100 to 200 gig depending on how much free space i have and it will shrink the vm hard drive whenever you're not using it or whenever it restarts and right above me tends to be the other thing i like to change which is experimental features this will change every year or so once docker's evolving but on mac os since we're running a linux vm inside of our mac there are a few things that docker has to do in the background to make this all work right of course it's a virtual machine so in this case i've enabled the new virtualization support in the recent versions of mac os which is supposed to be a little faster than the older version that docker used to use and this one right above me the virtual fs is a new feature in 2022 it may already be out of beta by the time you see this but that feature i enable because it enhances the speed of my file access when i'm sharing files from my host into the container you maybe don't understand all this yet that's totally fine just feel free to enable these if you run into any problems especially run performance and file access vs code or visual studio code if you haven't used it there's a video later in this section that will explain some of the details on things i like about it but vs code is my go-to editor you don't have to use any specific editor to edit docker files or kubernetes files in this course or in general but visual studio code has docker add-ins compose add-ins kubernetes add-ins all the add-ins for all the tools you're going to learn in this course so it recognizes the file formats it highlights the syntax inside the files and generally is the tool i use every day you will not be coding in this course but using a development editor like vs code does help in devops like tasking for creating docker files and all the other yamls that you will have to deal with so i recommend it you'll see more about that later and just one little feature that i will talk again about later with vs code is that it works on linux desktops mac and windows you can download it free from microsoft for all three os's and you can sync the settings across all your setups so i do that in order to have my settings synced on my mac as well as my windows machines and a linux desktop that i have next on your to-do list is to download or clone the course repository from github and a reference link in this video as well as a few lectures earlier that was all the written information as well as all the links all in one nice place for you to download this stuff but you're going to use a git clone command to copy this repository down to your local machine so you have all the sample files that you'll need throughout this course and that's it you've got docker desktop installed you've got vs code or your favorite editor you can use whatever editor you want but i will be using vs code in this course you've got macs built in terminal that you can use for all the commands we're going to be typing and you've cloned the repository down somewhere in your user directory and you're ready to rock let's get going
Info
Channel: Bret Fisher Docker and DevOps
Views: 42,016
Rating: undefined out of 5
Keywords: docker tutorial, docker tutorial for beginners, docker desktop, learn docker, install docker desktop, docker desktop license, docker desktop faq, docker desktop for learning, install docker for learning, learn kubernetes, install kubernetes for learning, docker course, docker on windows, docker containers, docker compose, docker for beginners, docker basics, install docker on mac, docker desktop for macos, install docker desktop on macos, install kubernetes on mac
Id: gcacQ29AjOo
Channel Id: undefined
Length: 10min 33sec (633 seconds)
Published: Mon Sep 12 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.