How to create lightweight Docker images using multi-stage builds?

New method of using the multi-stage builts with Docker 
27 June 2017   1308

Is an open source software platform to create, deploy and manage virtualized application containers on a common operating system, with an ecosystem of allied tools


Dynamic, functional language designed for building scalable and maintainable applications

Since version 17.05, Docker supports multi-stage builds. Multi-stage builds you will be able to have a single Dockerfile contain multiple FROM instructions, separating multiple stages of a build, where artifacts from one stage can be used in the next and all resulting in a single image.

Advantages of this technology:

  • Reduction of image's size. Packages increase the size of your image but aren’t required during runtime.
  • Ability to install debugging\tracing packages only to the final container.
  • The final container can be based off a slim image.
  • Dockerfiles are easier to maintain.

Dimitris Zorbas, engineer and open-source fan, created a big article with tutorial how to use this technology on practice. 

Canonical to Represent Minimal Ubuntu

New version of Ubuntu is created for servers, isolated containers based on Docker and cloud systems
12 July 2018   658

Ubuntu team presented a simplified version of the base image - Minimal Ubuntu. It is designed for servers, isolated containers based on Docker and cloud systems. The release features high performance, minimal load time and automation of applications in the cloud.

The small footprint of Minimal Ubuntu, when deployed with fast VM provisioning from GCE, helps deliver drastically improved boot times, making them a great choice for developers looking to build their applications on Google Cloud Platform.

Paul Nash

Group Product Manager, Google Cloud

The authors of the project emphasize the size of the distribution kit, which "weighs" 157 MB, and also supports the main cloud systems like Amazon EC2, Google Compute Engine (GCE), LXD and KVM / OpenStack, each of which has its own optimized version of the package. In addition, the OS-based image for operating with containers based on the Docker platform, compatible with the Kubernetes.

Minimal Ubuntu is designed for automated execution, so it includes only a minimal set of tools. The distribution can be upgraded to a set of Ubuntu Server packages using the special utility "unminimize", which returns components that are convenient for interactive management.

According to Canonical representatives, the deletion of the manual control functions resulted in the acceleration of the load time by 40% and the reduction of the occupied disk space by 50%. At the same time, this release remained completely compatible with all the packages from standard Ubuntu repositories. Required packages can be installed using the standard package manager apt or using snapd, which are included in the distribution by default.

Two assemblies are available for download, based on Ubuntu 16.04 LTS and 18.04 LTS. You can download them on the official website.