$ docker ps -a
$ docker image ls
$ docker run ubuntu
Unable to find image 'ubuntu:latest' locally
latest: Pulling from library/ubuntu
f3ef4ff62e0d: Pull complete
Digest: sha256:a0d9e826ab87bd665cfc640598a871b748b4b70a01a4f3d174d4fb02adad07a9
Status: Downloaded newer image for ubuntu:latest
$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu latest 597ce1600cf4 5 days ago 72.8MB
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0a62cb3952b8 ubuntu "bash" 52 seconds ago Exited (0) 51 seconds ago romantic_bell
$ docker run -it -d ubuntu
2362f603c44bff9e0798af92761802ca8cc429f0664ab35b765cb038b682f392
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6565a1ceb30f ubuntu "bash" 1 second ago Exited (0) 1 second ago beautiful_lamarr
2362f603c44b ubuntu "bash" 2 minutes ago Up 2 minutes interesting_wilson
$ docker exec -it 2362f603c44b bash
root@2362f603c44b:/#
$ docker stop $(docker ps -a -q)
$ docker rm $(docker ps -a -q)
$ docker commit 2baefe78caff splincode/ubuntu-modified
sha256:a238bb4a7712bf133f0a6d5e19db8cd746b450a57ac948cd538c6a9d10dd0608
$ docker login
$ docker push
$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
splincode/ubuntu-modified latest a238bb4a7712 6 minutes ago 72.8MB
ubuntu latest 597ce1600cf4 5 days ago 72.8MB
$ docker rmi splincode/ubuntu-modified
$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu latest 597ce1600cf4 5 days ago 72.8MB
$ docker rmi -f $(docker images -a -q)
$ docker build -t ${IMAGE}:${VERSION} .
$ docker tag ${IMAGE}:${VERSION} ${IMAGE}:latest
https://www.youtube.com/watch?v=3c-iBn73dDE&ab_channel=TechWorldwithNana https://www.youtube.com/watch?v=dU5112nqViY&ab_channel=Refactored