1. Overview

During the past few years, Docker has become the de facto standard for containerization on Linux. Docker is easy to use and provides lightweight virtualization, making it ideal for building applications and microservices as more and more services run in the cloud.

Although creating our first  images can be relatively easy, building an efficient image requires forethought. In this tutorial, we’ll see examples of how to write efficient Docker images and the reasons behind each recommendation.

Let’s start with the use of official images.

2. Base Your Image on an Official One

2.1. What Are Official Images?

Official Docker images** are those created and maintained by a team sponsored by Docker, or at least approved by them**. They manage the Docker images publicly on GitHub projects. They also make changes when vulnerabilities are discovered and ensure that the image is up-to-date and follows best practices.

Let’s see this more clearly with an example that uses the  Nginx official image. The creators of the webserver maintain this image.

#devops #docker #nginx

Tips for Creating Efficient Docker Images
2.65 GEEK