Alpine for Docker image

I have updated my personal Dockerfiles to use alpine as the base image instead of Ubuntu. There are many purposes for using alpine.

Prior this, i use many base image that I don't care about built-images size. However, when i using Kubernetes, having small images size can make rolling out update speed much faster.

Some tips for reducing Docker image size:

  • Using smaller base image (alpine, busybox, etc..)

  • Remove any unnecessary files or artifacts.

  • Use multi-stage builds to create intermediate images.

  • Use Docker image optimization tools like Docker Slim or Jib.