docker

What? You Haven't Used K8s Yet?

With the rise of containerization, more and more companies are adopting Kubernetes (or K8s) to run various containerized services within K8s clusters. Not only does this provide a standard approach for deployments (since everyone writes YAML configuration files to describe how services are deployed), it also offers more flexibility in system resource scheduling and scaling (using K8s commands makes it easy to adjust the number or resources of service containers). So usually, after learning Docker and docker-compose, the next step is to learn how to use K8s.

Posted on  Mar 30, 2023  by  Amo Chen  ‐ 1 min read

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