- [Instructor] Virtual machines are a commonly used feature
when you need to bring up an entire server
to provide roles and features for your network.
The ability to simulate hardware
allows you flexibility in how and where
to place these servers.
Some time ago, developers found a way
to take virtualization to another level.
They realized that if the thing they wanted to publish
was a network application,
they didn't need an entire virtual machine.
They didn't need to construct a whole operating system
around their one application.
They came up with a new technology called containers.
Containers simulate the operating system,
allowing just enough space for an application to run
in the new environment.
In much the same way that Hyper-V
shares your physical hardware to emulate virtual hardware,
containers is a feature
that takes your host operating system
and shares that to emulate a virtual operating system.
This means that the environment you build and work with
is much smaller.
When you think about it,
applications don't need hardware.
Applications only need an operating system,
and that can be simulated.
They count on that operating system
to deal with the hardware.
A container shares portions of the host operating system,
the kernel, the dlls,
and other components
and that allows you to build on a layer
a much smaller component that only holds the application
and any unique requirements that that may have.
These containers have several benefits,
including the one that I find to be the most important.
Containers are completely portable.
When a team of programmers has finished creating
their perfect custom application in a container,
they can publish that same container on a production server.
That means there's no installation process
for the new application.
There's no risk of it not running correctly,
because the new host has a different processor
or a different video card,
or a different network controller driver.
You actually run the application
in the exact environment where it was created.
And you get to continue working on version 2.0
in a perfect copy of the same environment.
Installing this feature is a little different
than other roles and features
that we've looked at in Windows server 2019.
Here we are on one of the member servers in our domain.
It's not necessary that this server be in a domain.
It can be a standalone server, and it will work just fine.
Let me go ahead and open PowerShell
to install and set this application up.
It starts pretty much the same
as installing any other feature.
And you could do this step from the Windows admin center,
or you could do it from the server manager,
but since we have PowerShell open,
let me go ahead and
install the Windows feature here.
The Windows feature that we want to install is containers.
And it will go out and collect the information
and install that feature,
but the one thing it won't add
is administrative tools to manage containers.
There are no admin tools to install this from Microsoft.
Originally, Microsoft did create
a module of PowerShell commandlets,
back when Windows server 2016 was in preview phase.
But they were deprecated very soon
in favor of Docker commandlets and the Docker engine.
This install is done.
I'm going to go ahead and restart this machine
using the shut down command with the R option.
And when it comes back up,
we're going to go ahead and install those Docker features.
Now that Windows has rebooted,
we can continue with installing the Docker engine
and management tools.
Docker is the biggest player in the containers space,
so it made sense for Microsoft to partner with them
for management tools for the Docker's feature
on Windows server.
Let me go ahead and open PowerShell again.
And inside PowerShell,
I'm going to first run a command
to install a management provider.
And the commandlet to do that looks like this.
It's Install-Module.
And specifically, I want to install the module
Docker Microsoft Provider.
And Microsoft is abbreviated there.
And I'm going to add the Force parameter
to the end of that commandlet.
And if this is the first time
you've reached outside of Windows
to pull down information,
you're going to be prompted to install PowerShellGet,
this new Get provider.
So I'm going to go ahead and accept that,
because I haven't done that yet on this machine.
So yes to accepting that,
and I may be prompted for another security approval.
Let's see.
Nope, it looks like that one went through
without any problem.
The next thing that we need to do,
and I'll hit enter a couple of times,
just to buy us a little bit of space,
is install the Docker package.
And this time, instead of installing a module,
we're going to install a package,
because this includes more than just some commandlets
and basic features.
We're installing the entire Docker engine this time,
as well as the PowerShell tools.
So the package that we want to install is Docker,
and this time we're going to cite the provider
that we just installed,
the Docker Microsoft Provider.
And once again,
I'm going to use the Force parameter
to make sure that this goes through.
There we go.
It has installed.
Now that the feature
and the Docker engine and commandlets are installed,
you will have access to some operating system base images
and can start creating containers
to develop and deploy custom applications.