1参照 https://www.cnblogs.com/qq3245792286/p/16300986.html
2jdk1.8 8u_202 镜像的基础上加上python3.7.4 加上一些其他的包实现Java调用python 处理图片的操作
3docker images
4 docker run -it 192.168.110.210:8081/library/jyc-java8_202:v1.0.0 /bin/bash
运行并进入容器:
执行: wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz
tar -xzvf Python-3.7.4.tgz
5.编译和安装
cd Python-3.7.4
./configure --prefix=/usr/local/src/python37 # 配置安装位置
sudo make
sudo make install
6.建立软连接
sudo ln -s /usr/local/src/python37/bin/python3.7 /usr/bin/python3.7
sudo ln -s /usr/local/src/python37/bin/pip3.7 /usr/bin/pip3.7
接下来你就可以使用python3.7,而不会影响系统自带的python2.7和python3.6
如果你想用python3.7替换掉系统默认的python3
sudo rm -rf /usr/bin/python3
sudo ln -s /usr/local/src/python37/bin/python3.7 /usr/bin/python3
默认ubuntu系统中没有pip3,直接建立软连接即可。
sudo ln -s /usr/local/src/python37/bin/pip3.7 /usr/bin/pip3
输入python3默认就是你安装好的python3.7了
----------------------------------加入一些处理图片的包------------------------------
apt-get update
apt-get install exiftool -y # -y 不要省略,否则不成功
pip install flirimageextractor -i https://pypi.douban.com/simple
pip install loguru -i https://pypi.douban.com/simple
pip install pandas -i https://pypi.douban.com/simple
docker commit -a="jyc" -m "jdk1.8_202 add python3" 89c3c72fd755 192.168.110.210:8081/library/jyc-java8_202-python3.7:v1.0.0
docker commit -a="jyc" -m "add some software " 926dda36e7b9 192.168.110.210:8081/library/jyc-java8_202-python3.7:v2.0.0
docker push 192.168.110.210:8081/library/jyc-java8_202-python3.7:v1.0.0
docker push 192.168.110.210:8081/library/jyc-java8_202-python3.7:v2.0.0
挂载到指定路径 上传图片就可以处理了