- [Instructor] Without the Docker daemon running
you really aren't running Docker.
In my experience with Ubuntu Docker for Mac
and Docker for Windows, the Docker daemon
will start automatically by default.
However, I have run into a few platforms over time
where you need to configure the Docker daemon
to start on boot manually.
Thankfully, it's very easy to do.
Now commands vary by Linux distribution,
but generally you'll use systemd,
this is for Red Hat Enterprise Linux,
CentOS, Fedora, and Ubuntu 16.04 or higher,
which is controlled by the systemctl command.
Now let's go over into Ubuntu Linux
and verify whether or not we have Docker enabled
to start on boot.
I'm going to use the systemctl command
and we'll just type in status to check the status
of Docker right now.
And we can see, thankfully, it says up here
that Docker is active and it's running.
And that tells us that Docker is running right now,
but is Docker actually enabled to start on boot?
Well if you look up here underneath service enabled,
you can see that it is enabled to start on boot.
Now to disable it, it's simply systemctl disable docker.
It looks like permission is denied,
and that's because we forgot to use sudo.
So I'm going to clear the screen
and let's do a sudo systemctl
and let's disable docker from starting on boot.
Enter our password there.
And we can see that the Docker daemon was disabled
from starting on boot.
So now to ensure that the Docker daemon starts on boot
it's as easy as using systemctl with the enable command
for the Docker daemon.
And there we go, Docker is enabled to start on boot.
You can do a systemctl status docker
to ensure that the next time your host boots
that the Docker daemon will be started automatically.