Now in this lecture we are going
to install Docker on Windows,
so obviously you can skip it if you're on Mac OS or Linux.
Now, we can click on Get started to be taken to the page
where we can download Docker Desktop for Windows
and we will use that.
But before we start doing that actually go to developers
and then Docs here in the Menu
and then there click on Download and Install.
And then Docker Desktop for Windows,
so that you can learn about these system requirements
which you have to meet in order to be able to install it.
And you need either Windows 10 Enterprise Pro
or Education or Windows 10 Home to use Docker Desktop
if you have an older version of Windows, Windows 8
or 7 the next lecture is for you.
Because there I show you an alternative way
of installing Docker but if you have any chance
of using Docker Desktop which we're going to install
in this lecture definitely use that chance.
So if you, for example are able to upgrade to Windows 10
you might wanna consider doing that.
Now if you've got Windows 10 Pro Enterprise or Education,
you need to have Hyper V and Containers features enabled.
And in order to enable both of that,
you can search for Windows 10 enable Hyper V
to find certain instructions on how to do that,
you best follow the approach described here
on the official Microsoft webpages.
And in the end you just need to run one command
to enable Hyper V, you need to do that in PowerShell
which is a default tool that ships
with your Windows installation which you have to run
as administrator.
Now once you are running this as administrator
make sure you copy and paste this command into PowerShell
and simply execute it and this will enable
a functionality in your operating system
which Docker Desktop needs to in the end
run these Docker containers on your system.
So make sure you enable this,
and thereafter in the same administrators
started PowerShell session run another command
which you find in an attached file.
Actually in that attached file you find both commands
but now we need this enable containers command here
and run this in your PowerShell as well.
With that you enable the two features
which you need to enable, if you are on Windows 10 Home,
then you gotta separate page here with more steps
you need to follow in order to install Docker Desktop.
So click on that install Docker Desktop
on Windows Home link and make sure you meet
all these requirements here.
Specifically, you need to enable the WSL 2 feature
on Windows and you got another link
to the Microsoft documentation which informs you
how you can do that.
It's again in the end very simple.
You first of all need to enable the WSL feature
by running this command again in PowerShell,
started as an administrator.
You don't need to do this on Windows 10 Pro
but you need to do this on Windows 10 Home
and then execute this command here in PowerShell.
And once you did that you need to update to WSL 2
by following the steps outlined here.
Thereafter, make sure you enable the virtual machine feature
by running this command here in PowerShell as administrator,
obviously you can also leave PowerShell up and running.
So hit enter and now with that you need to download
a Linux kernel update package because WSL 2 in the end
is a Linux installation inside of your Windows installation,
and that Linux installation will be used by Docker Desktop
and by Docker itself then.
Now therefore, we now needed to enable an updated,
now we need to download the Linux kernel update package
and that again can be done with the link you find here.
It simply downloads a file which you can execute,
walk through that installer which should be super quick
and which in the end then just updates your Linux kernel
inside off that Linux system which you have inside
of your Windows system.
Then execute this command here in PowerShell
as administrator, to set version 2 of this Linux
inside Windows solution here as a default version
and then install an actual Linux distribution
of your choice.
So that will then be the Linux operating system
running inside of your Windows system
in addition to Windows of course,
it does not replace Windows it just runs in addition.
Now here, you can really follow these instructions
and pick any distribution you want,
Ubuntu is a very typical choice here and simply then
walk through the installer here and follow the other steps
which are outlined in this article.
You don't need to install the Windows terminal here
if you don't want to, you can but you don't have to
and your therefore done.
Now, if you're facing any problems also have a look at
the troubleshooting guidelines here at the bottom
of this Microsoft article which of course
also find attached to this lecture.
And once you did all of that you're also prepared
to install Docker Desktop
on your Windows 10 Home installation.
Again, this was not required as I mentioned before
if you are on Windows 10 Pro or Enterprise or Education.
Of course, you also must meet the hardware requirements
outlined here and outlined here
which are the same requirements
and once all of that is set up therefore,
you now can use that installer
which you find on the Getting Started page.
So simply download Docker Desktop for Windows
and then wait for this installer to be downloaded
which can take a while of course and once it is downloaded
walk through the installer.
Now we're going to do this together,
so let me just wait until this is finished
and I'll be back thereafter.
Now once this was downloaded simply double click
on the downloaded executable to start the installer.
You might be prompted to enable WSL 2 Windows features,
especially on Windows 10 Home
and you should then check this.
If you don't have this option you can also proceed
without it though, if you're prompted to enable Hyper V
then check this.
So long story short whichever check boxes you see here
just tick them of course,
with the exception of the Add shortcuts to desktop checkbox
that is up to you wherever you wanna do that.
Then click OK, and this will now install Docker Desktop
and therefore the Docker tool on your system.
Now this again can take a while so let's wait
for this installation to finish
and eventually this should be done.
Now once this is done you might be prompted to restart
your system if you are, of course do so and thereafter,
after your system restarted Docker might have
started up automatically.
Otherwise, simply execute Docker Desktop
this tool which we just installed.
Make sure you execute and started and once you do started
you should see this prompt here or this screen here.
You also should have that whale in your system tray here
which proves that Docker is up and running.
Here you can also always dive into the settings of Docker
if you need to configure something though for the most part
you shouldn't need to do too much here.
However, you should ensure that Docker is always up
and running if you plan on working with it,
so if there is no whale down there you will not be able
to execute Docker commands.
So throughout this course ensure that Docker is up
and running if you wanna work with it.
Here in this graphical user interface you can click on this
gear icon to be taken to the settings
and here you can control whether Docker Desktop
should start up when your system starts or not.
But for convenience you might wanna leave this turned on,
but it's of course up to you.
You also might have the option to choose whether WSL 2
should be used on Windows 10 Home you should do that
on Windows 10 Pro you can do it,
as you see it provides a better performance
but you can also use just this Hyper V tool
which we enabled.
Now you don't need to do too much about the average settings
you see here you can ignore them for now,
I will come back to them if we should need them
throughout this course.
And with that we got Docker installed
and we're ready to use it,
you can now open up your regular command prompt,
you don't need to run it as administrator.
And there you should be able to enter Docker like this
and you should not get an error
but instead a list of commands you could use
and that proves that it works and that Docker was installed.
And we're soon going to use it for a more useful command
than just this dummy command
but that's now the setup we need.