Sometimes we make mistakes. When first learning docker we probably make many mistakes and end up with tons of unused docker images.
If you are on Linux like me, you won’t have a desktop dashboard like Mac and Windows get, so things are harder. To see a list of what images you have created you use the following command
docker ps -a
That command will output something like this.
It will show the CONTAINER ID, IMAGE, COMMAND etc. as you can see. To delete an image you use the container id with docker rm like this.
docker rm b5f8fae52bce
I’ve seen older internet posts using the IMAGE value but I had no success with that method. I am guessing something changed. I didn’t even see an example of this I just tried it. I don’t see any mention of this in the docs either. But it works. This part in the getting started intro actually explains it. I think something did change.
Containers are quickly and drastically changing the way we build and deploy apps these days. Containers make deployment easier and faster by providing the exact environment that your code needs to operate. However, with this power and ease comes complexity.
First off there are various container technologies, but the most common is Docker.
OpenShift vs Kubernetes: What are the Differences? Basically Openshift uses Kubernetes under the hood and offers improved features especially to security. One of the main reasons I never used Docker and Kubernetes was due to running all containers in root mode. That just begs to be hacked and destroyed. So when I realized that is how it worked I moved on. Now someone has done something about the lunacy.
The Following video explains containerization technology.
This video actually does a Virtual Machine vs Container comparison which is handy information to know. When I first started down the Microservices route I was using Virtual Machines to emulate environments. Now I can just use Docker. The VM ate tons of resources.
Introduction To Docker and Docker Containers
This next video is about Docker and containerization. It covers some of what was in the above video but explains Docker.
Docker Tutorial – What is Docker & Docker Containers, Images, etc?
I really like this video it does a nice job of explaining Docker with diagrams.
Docker Tutorial for Beginners – A Full DevOps Course on How to Run Applications in Containers
Once you know what Docker is you will want to know how to use it. This is a Two Hour tutorial course on Docker.
Container Orchestration Explained
What is Kubernetes
Once you learn about containers and Docker you then need to know how to orchestrate your applications Docker containers. Kubernetes is an orchestrator for containers.
Kubernetes for Beginners – Docker Introduction in 15 Minutes
This video explains more about containerization, docker, kubernetes and why you would want to use them.
What is OpenShift?
Once you decide you want to use Kubernetes you need some way to host your apps. Meet OpenShift
OpenShift Technical Overview
Building and running micro services on OpenShift: Part I
This video has some useful technical information about how OpenShift works.
Building and running micro services on OpenShift: Part II
This video has some useful technical information about how OpenShift works with Kubernetes to orchestrate your application and help it scale up and down in response to traffic.
Building and running Microservices on OpenShift: Part III
This video further covers some of the basic features of OpenShift from a developers standpoint.
Demo – Deploying from GitLab to OpenShift Container Cluster