Misunderstandings related to Docker Terminologies | Docker made Easy

Muhammad Faheem Muhammadi
3 min readSep 6, 2022

--

Docker image from Rumana Shaikh.

The fact is that you’re learning docker. And, you’re roaming multiple web pages trying to understand the docker terminologies such as docker, images, containers etc. But, the problem arises when different people use different terminologies interchangeably, so making it confusing to understand.

But this short, easy-to-understand, and time-effective blog has you covered with the right content. So, you can read it with a sigh of relief.

So, lets dive into some of the most important terminology confusions:

  • Docker file vs Docker image: A docker file is a text document that contains all the commands a user could call on the command line to assemble an image. Using docker build command, users can create an automated build that executes several command-line instructions in succession.
    Whereas, an image is an ordered collection of root filesystem changes and the corresponding execution parameters for use within a container runtime. It typically contains a union of layered filesystems stacked on top of each other. So, the image comes after a docker file.

This is how a docker file looks like for containerizing node.js application:

FROM node:16

# Create app directory
WORKDIR /usr/src/app

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./

RUN npm install
# Bundle app source
COPY . .

EXPOSE 8080
CMD [ "node", "server.js" ]
  • Docker image vs Container image: Both refer to the same container image that is built from a docker file by executing docker build command on CLI.
# build container image
Docker build .
# then run the following command to display images in your docker # repo / registry
Docker images
  • Container image vs Container: Container image or docker image is the basis of container. It is a snapshot of an environment, or more easily, a description of what a container would contain as a packaged software application. Whereas, a container is a runtime instance of a container image.
  • Docker Container vs Container: Both refer to the same concept container. So, no need to worry. These are the packaged applications run on docker engine.
Containers, image from ATLASSIAN.
  • Docker Engine vs Docker runtime vs Container runtime: All of the three terms refer to same the thing. But, what is that thing? Docker Engine! It is an open source containerization technology for building and containerizing your applications. It is the industry’s de facto container runtime that runs on various Linux (CentOS, Debian, Fedora, Oracle Linux, RHEL, and Ubuntu) and Windows Server operating systems. Docker creates simple tooling and a universal packaging approach that bundles up all application dependencies inside a container which is then run on Docker Engine. Docker Engine enables containerized applications to run anywhere consistently on any infrastructure, solving “dependency hell” for developers and operations teams, and eliminating the “it works on my laptop!” problem.
Docker Engine over Host OS, image from ATLASSIAN.

If you see an architecture like above, then know that the layer container engine or docker engine or docker runtime, that you see above host OS, are used interchangeably.

Now, you can make the following flow in your mind:

Docker file builds into Docker image executes into Container containerized by Docker Engine.

Wasn’t it that great to read. Feel good? Let me know if you have find this blog beneficial by hitting a like or sharing with your friends or any comments!

Hope this blog helped you. If you want to dive deep and learn more, you may visit the Docker glossary:

Thank you for reading!

--

--