Docker

Docker multi-stage builds tutorial

The size of Docker images is also quite important in production environments.

If the Docker image is too large, not only will it occupy the transmission bandwidth, but it will also prolong the deployment time, so how to optimize the size of the Docker image is an important issue.

There are several ways to optimize the size of a Docker image, one of which is multi-stage build. However, the multi-stage builds example provided by the Docker official document does not work properly.

Last updated on  Dec 30, 2022  in  Docker  by  Amo Chen  ‐ 5 min read

Docker Environment Variable Usage Notes

Environment variables are one of the common methods used to control program behavior during development.

With Docker being increasingly used in development environments in recent years, it is essential to learn how to use environment variables in Docker.

This article introduces several methods of configuring environment variables in Docker and Docker compose.

Posted on  Jun 19, 2020  in  Docker  by  Amo Chen  ‐ 3 min read