docker基础镜像打包

基础镜像打包

Alpine

apk update  //需要更新源
apk add gcc
apk add musl-dev
apk add python-dev  //缺少python开发环境
apk add zlib-dev   // 安装pip pillow
apk add libjpeg-turbo-dev //安装pip pillow
apk add postgresql-dev   //安装pip psycopg2-binary

Alpine 不能安装opencv-python

Ubuntu

apt-get update //更新源
apt-get python3-pip   //安装pip,不需要python get-pip.py
更新国内原
#vim /etc/apt/source.list
#cat /etc/apt/source.list
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse 
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse 
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse 
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
apt-get update
原文地址:https://www.cnblogs.com/zhangjxblog/p/12168336.html