Application Delivery Management
Application Modernization & Connectivity
CyberRes
IT Operations Management
I will use "Risk service" for the reference in the examples. If you are not aware, Risk Service is bundled inside the Advanced Authentication appliance.
Use this command to get the currently installed version of the docker.
Example: lakhil@lakhil-docker:~$ docker --version
Docker version 19.03.3, build a872fc2f86
Use this command to pull images from the docker registry to the local store.
Example: docker pull hello-world
Refer to this URL for more information.
Use this command to list all the locally stored docker images.
Use this command to list the running containers
Use this command to show all the running and exited containers
Use this command to access the running container
Example: To go inside the shell of the container
lakhil@lakhil-docker:~$ docker exec -it 4f38323ca234 /bin/sh
In the above command "4f38323ca234" is the container ID. You need to run the "docker ps" command to see the container ID.
You can also get an output of the shell commands without going inside the container.
Example (a): lakhil@lakhil-docker:~$ docker exec -it 4f38323ca234 ls -l
total 8
drwxr-xr-x 2 novlwww root 4096 Mar 11 2019 bin
-rwxr-xr-x 1 root root 458 Jun 12 08:29 startup.sh
(b) lakhil@lakhil-docker:~$ docker exec -it 4f38323ca234 ps -ef
UID PID PPID C STIME TTY TIME CMD
novlwww 1 0 0 08:32 ? 00:00:00 /bin/sh ./startup.sh
novlwww 83 1 1 08:34 ? 00:00:44 /opt/netiq/common/jre/bin/java -
novlwww 1703 1 0 09:31 ? 00:00:00 sleep 5
novlwww 1704 0 30 09:31 pts/0 00:00:00 ps -ef
Use this command to list all the volumes known to Docker.
Use inspect to get more details about a volume.
Use this command to live stream container's runtime metrics.
To limit data to one or more specific containers, specify a list of container names or ids separated by a space.
Use this command to understand the docker’s disk usage.
10. docker stop <container id>
Use this command to stop a running container.