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
136MAINTAINER 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
2013RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
@@ -30,25 +23,29 @@ RUN yum install -y git
3023RUN yum install -y gcc
3124RUN yum install -y make
3225RUN yum install -y wget
26+ RUN yum install -y which
3327RUN yum install -y screen
3428RUN yum install -y gcc-c++
3529RUN yum install -y crontabs
3630RUN yum install -y zlib-devel
3731RUN yum install -y sqlite-devel
3832RUN yum install -y openssl-devel
3933RUN yum install -y libSM.x86_64
40- RUN yum install -y libXrender.x86_64
4134RUN 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
5249RUN yum install -y nginx
5350
5451# clean yum cache
@@ -57,11 +54,8 @@ RUN yum clean all
5754# install libs of python3
5855ADD ./requirements.txt /root/
5956WORKDIR /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
6461CMD /bin/bash
65-
66- # centos7
67- # ENTRYPOINT /usr/sbin/init
0 commit comments