Created
August 8, 2018 09:30
-
-
Save 9kl/ae24deb5db90a1fae59846452d305caa to your computer and use it in GitHub Desktop.
ubuntu py27 docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# docker.hshl.ltd/python27 | |
# sudo docker run -it docker.hshl.ltd/python27 python | |
FROM ubuntu:16.04 | |
MAINTAINER hshl.ltd (chinafengheping@outlook.com) | |
# 更改ubuntu的源为阿里云的源 | |
RUN echo "deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse" > /etc/apt/sources.list | |
RUN echo "deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse" >> /etc/apt/sources.list | |
RUN echo "deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse" >> /etc/apt/sources.list | |
RUN echo "deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse" >> /etc/apt/sources.list | |
RUN echo "deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse" >> /etc/apt/sources.list | |
RUN echo "deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse" >> /etc/apt/sources.list | |
RUN echo "deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse" >> /etc/apt/sources.list | |
RUN echo "deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse" >> /etc/apt/sources.list | |
RUN echo "deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse" >> /etc/apt/sources.list | |
RUN echo "deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse" >> /etc/apt/sources.list | |
# apt | |
RUN apt-get update | |
# python 2.7 | |
RUN apt-get install -y python2.7 | |
RUN ln -s /usr/bin/python2.7 /usr/bin/python | |
# pip | |
RUN apt-get install -y python-pip python-dev build-essential | |
# 定义输出命令 | |
CMD python |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment