Skip to content

Commit

Permalink
update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
xianhu committed May 21, 2020
1 parent efd71d8 commit b983bc4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 25 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -13,6 +13,7 @@
*.csv
.*

venv/
test/
data/
build/
Expand Down
44 changes: 19 additions & 25 deletions Docker/Dockerfile
@@ -1,20 +1,13 @@
# Dockerfile by xianhu: build a docker image
# centos6:
# docker build -t user/centos:v6.10.3 .
# docker run -it --name test [-p -v] user/centos:v6.10.3
# docker attach test
# centos7:
# docker build -t user/centos:v7.0.1 .
# docker run -dt --privileged --name test [-p -v] user/centos:v7.0.1
# docker exec -it test /bin/bash
# docker build -t user/centos:v7.8.1 .
# docker run -it --name test [-p -v] user/centos:v7.8.1

# FROM centos:7
FROM centos:6.10
FROM centos:7.8.2003
MAINTAINER xianhu <qixianhu@qq.com>

# change system environments
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
ENV LANG "en_US.UTF-8"
ENV LC_ALL "en_US.UTF-8"

# change system local time
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
Expand All @@ -30,25 +23,29 @@ RUN yum install -y git
RUN yum install -y gcc
RUN yum install -y make
RUN yum install -y wget
RUN yum install -y which
RUN yum install -y screen
RUN yum install -y gcc-c++
RUN yum install -y crontabs
RUN yum install -y zlib-devel
RUN yum install -y sqlite-devel
RUN yum install -y openssl-devel
RUN yum install -y libSM.x86_64
RUN yum install -y libXrender.x86_64
RUN yum install -y libXext.x86_64
RUN yum install -y libXrender.x86_64

# install node
RUN curl -sL https://rpm.nodesource.com/setup_14.x | bash -
RUN yum install -y nodejs

# install epel
RUN yum install -y epel-release

# install python
RUN yum install -y https://centos6.iuscommunity.org/ius-release.rpm
# RUN yum install -y https://centos7.iuscommunity.org/ius-release.rpm
RUN yum install -y python36u
RUN yum install -y python36u-pip
RUN yum install -y python36u-devel
RUN yum install -y python36
RUN yum install -y python36-devel

# install nginx
RUN yum install -y epel-release
RUN yum install -y nginx

# clean yum cache
Expand All @@ -57,11 +54,8 @@ RUN yum clean all
# install libs of python3
ADD ./requirements.txt /root/
WORKDIR /root/
# RUN pip3.6 install --upgrade pip
# RUN pip3.6 install -r requirements.txt
# RUN pip3.6 install --upgrade pip -i http://pypi.douban.com/simple/
# RUN pip3.6 install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/

# centos6
# entry
CMD /bin/bash

# centos7
# ENTRYPOINT /usr/sbin/init

0 comments on commit b983bc4

Please sign in to comment.