Skip to content

Commit

Permalink
update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
hhyo authored and lihuanhuan committed May 5, 2018
1 parent 3106a1e commit 0cc672f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
2. 安装python3,版本号>=3.4:(由于需要修改官方模块,请使用virtualenv或venv等单独隔离环境!)
3. 安装所需相关模块:
`pip3 install -r requirements.txt`
为了自动构建docker镜像,requirements.txt的包是完整的依赖包,用户可按照说明进行选择性安装
4. MySQLdb模块兼容inception版本信息
由于python3使用的pymysql模块里并未兼容inception返回的server信息,因此需要编辑/pymysql/connections.py
在if int(self.server_version.split('.', 1)[0]) >= 5: 这一行之前加上以下这一句并保存,记得别用tab键用4个空格缩进:
Expand Down
6 changes: 0 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,3 @@ simplejson==3.14.0
urllib3==1.22
django-admin-bootstrapped==2.5.7
django-apscheduler==0.2.8
#后面为非必要模块,可按需安装
gunicorn==19.7.1
django-auth-ldap==1.3.0
aliyun-python-sdk-core==2.3.5
aliyun-python-sdk-core-v3==2.5.3
aliyun-python-sdk-rds==2.1.1
2 changes: 1 addition & 1 deletion src/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN yum -y install unzip git gcc gcc-c++ make cmake bison openssl-devel mysql-de
&& virtualenv venv4archer --python=python3.4 \
&& source venv4archer/bin/activate \
&& git clone -b github https://github.com/hhyo/archer.git \
&& pip3 install -r /opt/archer/requirements.txt -i https://mirrors.ustc.edu.cn/pypi/web/simple/ \
&& pip3 install -r /opt/archer/src/docker/requirements.txt -i https://mirrors.ustc.edu.cn/pypi/web/simple/ \
&& cp /opt/archer/src/docker/pymysql/connections.py /opt/venv4archer/lib/python3.4/site-packages/pymysql/ \
&& cp /opt/archer/src/docker/pymysql/cursors.py /opt/venv4archer/lib/python3.4/site-packages/pymysql/ \
&& yum -y install nginx \
Expand Down
19 changes: 19 additions & 0 deletions src/docker/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
certifi==2017.7.27.1
chardet==3.0.4
Django==1.8.17
idna==2.6
Naked==0.1.31
pycrypto==2.6.1
PyMySQL==0.7.11
PyYAML==3.12
requests==2.18.4
shellescape==3.4.1
simplejson==3.14.0
urllib3==1.22
django-admin-bootstrapped==2.5.7
django-apscheduler==0.2.8
gunicorn==19.7.1
django-auth-ldap==1.3.0
aliyun-python-sdk-core==2.3.5
aliyun-python-sdk-core-v3==2.5.3
aliyun-python-sdk-rds==2.1.1

0 comments on commit 0cc672f

Please sign in to comment.