[Intro Music]
Alright guys, in the previous
lecture I have explained you
differences between Docker commands
and Docker management commands. And
Docker management commands have
appeared not long ago, and they
actually combine some of regular
commands. And some people say that
you must use only management
commands, and forget about commands.
But I will argue with that because
Docker commands are much shorter,
and they are much quicker to type.
And also please note that you don't
need to remember all those commands
listed here. You will use just a
part of them on a regular basis.
All right, in this lecture, I want
to show you some alternative
versions of some popular commands
that you could use either with
commands or management commands.
And here is such a list. For
example, most popular command is
'docker ps', and this command lists
all containers that are currently
running. Alternative diversion for
this command with management
command is 'docker container ls'. And
of course, this command has more
characters, and you need more time
to type. That's why I prefer
personally to use this shortcut,
'docker ps'. Next alternative pair is
'docker build', and 'docker builder
build'. And with this command,
you're able to build a new image.
And again, please note that those
commands are completely equivalent,
and you're able to use either this
one or this one. Great. Next pair is
'docker inspect', and 'docker container
inspect'. With this command you're
able to inspect, and read
details about a specific container
that was created before. And again
you're able to use either a
shortcut 'docker inspect' or 'docker
container inspect', where container
is Management Command, and inspect
is sub-command. Next example is
'docker commit' and 'docker container
commit'. With this command, you're
able to create the image based on
specific container. And the last
example is 'docker run' and 'docker
container run'. It is also very
popular command, and I prefer to use
this shortcut. With this command
you're able to start a new
container, or if you want you're
able to use Management Command,
'docker container run' to perform the
same action. Great. That's
alternative of some commands, and
much more commands have
alternatives with management
commands, but I have just shown you
some examples of them in order to
get an idea of what is alternative
command for Management Command.
Great. Let me quickly go to terminal,
and use 'docker ps' command; and this
command will show you currently running
containers. And at the moment, this
list in my case is empty. And I
could use same command with
Management Command, docker container
ls'; and here in this output you see
the same result as you see in
'docker ps' output. And that means
that those two commands are completely
equivalent. Great. That's all for
this lecture. And please note that
you're able to use either short
versions of commands or long
versions with management commands.
And probably in the future Docker
developers will remove some Docker
commands like 'docker ps', 'docker
build', 'docker inspect', but I
personally don't think so, because
many many people use short versions
and they are used to them. Alright,
let's proceed, and next let's
start talking about containers and
images, and start performing
some practical activities. And I
will tell you how to pull image
from Docker Hub, and how to create a
new container based on that image.
Also, I will explain the structure
of image and container. I'll see
you in the next lecture. Bye-Bye.
[no audio]