When talking about Docker, people often use the terms containers and images. The difference between these two terms is simple: a container is an instance of an image, while an image is an immutable file that's essentially a snapshot of a container. In terms of object-oriented programming (OOP), we can say that images are like classes and containers are instances of these classes. For example, let's say you have a Docker image that is comprised of CentOS and Java 8. Using this image, you can create a container to run a Spring Boot application and another container to run a JEE application, as shown in the following diagram:
Docker images and containers