Docker Commands
Learn how to use Docker commands.
We'll cover the following
View, stop, and restart containers
Containers running in interactive mode (started with the -it
switch) can normally be stopped by pressing Ctrl|Cmd + C
.
๐ However, applications will not always shut down gracefully or signal they have terminated. If an interactive container fails to stop, youโll need to execute the
stop
command described below.
A list of running containers can be viewed by entering:
docker container ls
or the shorter:
docker ps
Practice
Letโs try running the commands:
-
Click to connect to the terminal and then open another terminal, too.
-
List the running containers.
๐ Keep the tab open. We will be running more commands in it.
Get hands-on with 1400+ tech skills courses.