-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (40 loc) · 1.53 KB
/
Dockerfile
File metadata and controls
49 lines (40 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#python3 development environment
FROM centos:centos7.3.1611
MAINTAINER feiyu <akwangj@126.com>
ENV TZ "Asia/Shanghai"
ENV TERM feiyu
#ENTRYPOINT echo "python3 development environment\n"
RUN yum install -y wget
RUN wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
RUN yum makecache
RUN yum install -y gcc zlib-devel make curl wget tar openssl-devel python-devel openssh-server perl-devel
RUN mkdir /var/run/sshd
CMD ["sshd_run.sh"]
# 设置root ssh远程登录密码
RUN echo "root:123456" | chpasswd
# 容器需要开放SSH 22端口,以使外部能够访问容器内部
#安装python3开发环境
RUN wget https://www.python.org/ftp/python/3.5.5/Python-3.5.5.tgz
RUN tar -zxvf Python-3.5.5.tgz
WORKDIR Python-3.5.5
RUN mkdir /usr/local/python3.5.5
RUN ./configure
#prefix==/usr/local/python3.5.5
RUN make && make install
#更换pip3国内安装源
#RUN echo -e "[global] \n index-url = https://mirrors.aliyun.com/pypi/simple/" >> ~/.pip/pip.conf
RUN pip3 install --upgrade pip
#安装setuptools
#RUN wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-19.6.tar.gz
#RUN tar -zxvf setuptools-19.6.tar.gz
#WORKDIR setuptools-19.6
#RUN python setup.py build
#RUN python setup.py install
#pip3安装
#RUN wget https://files.pythonhosted.org/packages/ae/e8/2340d46ecadb1692a1e455f13f75e596d4eab3d11a57446f08259dee8f02/pip-10.0.1.tar.gz
#RUN tar -xf pip-10.0.1.tar.gz
#WORKDIR pip-10.0.1
#RUN python setup.py install
RUN pip3 install django==1.10.8
EXPOSE 22
EXPOSE 8000