Docker — Three Ways To Create Container Images and Their Use Cases

Creating container images with examples in different ways and their use cases

Bhargav Bachina
Bachina Labs

--

Creating efficient and small images are very important in docker. In this article, we will look at the ways to create them and their use cases

  • What are Images
  • What is a copy-on-write strategy?
  • What are we building
  • Three ways of Building Images
  • Use cases
  • Conclusion

What are images

The whole operating system of Linux is a filesystem. So, Images are nothing but a big tarball of a layered filesystem. If you look at the below diagram, Image is built with a bunch of immutable layers. Each layer consists of files and folders and each layer is built only with the changes corresponding to the previous layer.

Layered File System

The first layer is called a base layer and each layer is immutable that means once created, we can’t change the file system. It uses a copy-on-write strategy.

What is a…

--

--