当前位置:   article > 正文

在docker的ubuntu16.04镜像安装python3.6的Dockerfile_docker python3.6国内镜像下载

docker python3.6国内镜像下载

Dockerfile文件 

  1. FROM ubuntu:16.04
  2. COPY sources.list /etc/apt/sources.list
  3. RUN apt-get update && apt-get install vim -y
  4. RUN apt-get update \
  5. && apt-get install -y build-essential libssl-dev libffi-dev python-dev wget \
  6. && rm -rf /var/lib/apt/lists/*
  7. RUN wget https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tar.xz \
  8. && tar -xvf Python-3.6.6.tar.xz \
  9. && cd Python-3.6.6 \
  10. && ./configure \
  11. && make install
  12. ENV PATH="/usr/local/bin:${PATH}"
  13. ENV PYTHON_VERSION="3.6.6"
  14. RUN ln -s /usr/local/bin/python3.6 /usr/local/bin/python
  15. RUN ln -s /usr/local/bin/pip3.6 /usr/local/bin/pip

sources.list文件 

deb http://

mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security multiverse

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/凡人多烦事01/article/detail/687318
推荐阅读
相关标签
  

闽ICP备14008679号