The document shows the steps taken to run an Nginx Docker container on a server. It starts the container with port 80 exposed and shows it is running. It then lists all containers, both running and stopped. It also lists the Docker images on the system before checking the running container again. It demonstrates removing a non-existent container, stopping a container by ID, and executing interactive bash in the running container to create and move a directory.
The document shows the steps taken to run an Nginx Docker container on a server. It starts the container with port 80 exposed and shows it is running. It then lists all containers, both running and stopped. It also lists the Docker images on the system before checking the running container again. It demonstrates removing a non-existent container, stopping a container by ID, and executing interactive bash in the running container to create and move a directory.
The document shows the steps taken to run an Nginx Docker container on a server. It starts the container with port 80 exposed and shows it is running. It then lists all containers, both running and stopped. It also lists the Docker images on the system before checking the running container again. It demonstrates removing a non-existent container, stopping a container by ID, and executing interactive bash in the running container to create and move a directory.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES dfcb8292cf75 nginx "/docker-entrypoint.…" 45 seconds ago Up 44 seconds 0.0.0.0:80->80/tcp, :::80->80/tcp wonderful_elgamal 66eef0c6e23e nginx "/docker-entrypoint.…" 6 hours ago Exited (0) 6 hours ago cool_engelbart 41ea862e04d6 nginx "/docker-entrypoint.…" 6 hours ago Exited (0) 6 hours ago admiring_shtern 6677c53374d5 nginx "/docker-entrypoint.…" 6 hours ago Exited (0) 6 hours ago elegant_ganguly c67af67f6c88 nginx "/docker-entrypoint.…" 6 hours ago Exited (0) 6 hours ago pensive_kalam c216d43910e8 hello-world "/hello" 8 hours ago Exited (0) 8 hours ago recursing_kapitsa
ubuntu@pwst-server:~$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES dfcb8292cf75 nginx "/docker-entrypoint.…" 52 seconds ago Up 51 seconds 0.0.0.0:80->80/tcp, :::80->80/tcp wonderful_elgamal
ubuntu@pwst-server:~$ sudo docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE nginx latest a7be6198544f 20 hours ago 142MB hello-world latest 9c7a54a9a43c 2 weeks ago 13.3kB
ubuntu@pwst-server:~$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE nginx latest a7be6198544f 20 hours ago 142MB hello-world latest 9c7a54a9a43c 2 weeks ago 13.3kB
ubuntu@pwst-server:~$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES dfcb8292cf75 nginx "/docker-entrypoint.…" 46 minutes ago Up 46 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp wonderful_elgamal
root@dfcb8292cf75:/# ls bin boot dev docker-entrypoint.d docker-entrypoint.sh etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var
root@dfcb8292cf75:/# mkdir testing
root@dfcb8292cf75:/# ls bin boot dev docker-entrypoint.d docker-entrypoint.sh etc home lib lib64 media mnt opt proc root run sbin srv sys testing tmp usr var
root@dfcb8292cf75:/# mv testing /home
root@dfcb8292cf75:/# cd home root@dfcb8292cf75:/home# ls testing