确定 Docker base image
So as of June 2019:
python:3.7-stretch(or whatever version of Python you use instead of
3.7) are a reasonable starting point. I suspect for most people the
slimvariant will result in overall smaller disk usage.
2. If you need more recent libraries or compilers than those provided by Debian Stretch, you probably want to use
ubuntu:18.04, which is more up-to-date than CentOS.
3. Once Debian Buster is released, the
pythonimages will likely have a
bustervariant which will be the clear winner: it will have both pre-installed new versions of Python and equivalent or more up-to-date packages than
4. And when April 2020 comes around,
ubuntu:20.04will take the lead on having the most up-to-date packages.
加速 image 构建
- 必要性分析： The high cost of slow Docker builds