How to choose base image?

  docker, question

I just got to know docker and learned some basic things soon.

At present, the company’s services (mainly JavaEE) are running on centos, and I have also tried to build a container based on centos:7 mirror image.
In the process of contacting some external materials, we found that ubuntu was the most sample.

The official ubuntu support is better, I know this
When I use ariyun’s container hub, all Dockerfile are under ubuntu, and ubuntu also has optimized versions of base image, phusion-baseimage, etc.

Question:
1. How did you choose base image? Is this important?
2. Does it matter which system is used for docker’s server system, and is ubuntu more suitable?

This depends on yourself. centos and ubutnu are both very good.

It doesn’t make much difference, but try alpine linux if you only focus on the size of the image.

This is very small and stable below 5M

Now I’m going to try to switch to alpine. It is said that the official image will switch to alpine completely.

I just don’t know if it’s true or not, but many official images have alpine versions.