Skip to content

Commit b983bc4

Browse files
author
qixianhu
committed
update dockerfile
1 parent efd71d8 commit b983bc4

2 files changed

Lines changed: 20 additions & 25 deletions

File tree

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
*.csv
1414
.*
1515

16+
venv/
1617
test/
1718
data/
1819
build/

‎Docker/Dockerfile‎

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
11
# Dockerfile by xianhu: build a docker image
2-
# centos6:
3-
# docker build -t user/centos:v6.10.3 .
4-
# docker run -it --name test [-p -v] user/centos:v6.10.3
5-
# docker attach test
6-
# centos7:
7-
# docker build -t user/centos:v7.0.1 .
8-
# docker run -dt --privileged --name test [-p -v] user/centos:v7.0.1
9-
# docker exec -it test /bin/bash
2+
# docker build -t user/centos:v7.8.1 .
3+
# docker run -it --name test [-p -v] user/centos:v7.8.1
104

11-
# FROM centos:7
12-
FROM centos:6.10
5+
FROM centos:7.8.2003
136
MAINTAINER xianhu <qixianhu@qq.com>
147

158
# change system environments
16-
ENV LANG en_US.UTF-8
17-
ENV LC_ALL en_US.UTF-8
9+
ENV LANG "en_US.UTF-8"
10+
ENV LC_ALL "en_US.UTF-8"
1811

1912
# change system local time
2013
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
@@ -30,25 +23,29 @@ RUN yum install -y git
3023
RUN yum install -y gcc
3124
RUN yum install -y make
3225
RUN yum install -y wget
26+
RUN yum install -y which
3327
RUN yum install -y screen
3428
RUN yum install -y gcc-c++
3529
RUN yum install -y crontabs
3630
RUN yum install -y zlib-devel
3731
RUN yum install -y sqlite-devel
3832
RUN yum install -y openssl-devel
3933
RUN yum install -y libSM.x86_64
40-
RUN yum install -y libXrender.x86_64
4134
RUN yum install -y libXext.x86_64
35+
RUN yum install -y libXrender.x86_64
36+
37+
# install node
38+
RUN curl -sL https://rpm.nodesource.com/setup_14.x | bash -
39+
RUN yum install -y nodejs
40+
41+
# install epel
42+
RUN yum install -y epel-release
4243

4344
# install python
44-
RUN yum install -y https://centos6.iuscommunity.org/ius-release.rpm
45-
# RUN yum install -y https://centos7.iuscommunity.org/ius-release.rpm
46-
RUN yum install -y python36u
47-
RUN yum install -y python36u-pip
48-
RUN yum install -y python36u-devel
45+
RUN yum install -y python36
46+
RUN yum install -y python36-devel
4947

5048
# install nginx
51-
RUN yum install -y epel-release
5249
RUN yum install -y nginx
5350

5451
# clean yum cache
@@ -57,11 +54,8 @@ RUN yum clean all
5754
# install libs of python3
5855
ADD ./requirements.txt /root/
5956
WORKDIR /root/
60-
# RUN pip3.6 install --upgrade pip
61-
# RUN pip3.6 install -r requirements.txt
57+
# RUN pip3.6 install --upgrade pip -i http://pypi.douban.com/simple/
58+
# RUN pip3.6 install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/
6259

63-
# centos6
60+
# entry
6461
CMD /bin/bash
65-
66-
# centos7
67-
# ENTRYPOINT /usr/sbin/init

0 commit comments

Comments
 (0)