File tree Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Original file line number Diff line number Diff line change 11# Dockerfile by xianhu: build a docker image
2- # usage: docker build -t user/centos .
3- # usage: docker run -dt --privileged user/centos
4- # usage: docker exec -it containerid /bin/bash
2+ # centos6:
3+ # docker build -t user/centos6 .
4+ # docker run -it --name test [-p -v] user/centos6
5+ # docker attach test
6+ # centos7:
7+ # docker build -t user/centos7 .
8+ # docker run -dt --privileged --name test [-p -v] user/centos7
9+ # docker exec -it test /bin/bash
510
6- FROM centos:7
11+ FROM centos:6.9
712MAINTAINER xianhu <
[email protected] >
813
914# change system environments
@@ -32,7 +37,8 @@ RUN yum install -y sqlite-devel
3237RUN yum install -y openssl-devel
3338
3439# install python
35- RUN yum install -y https://centos7.iuscommunity.org/ius-release.rpm
40+ RUN yum install -y https://centos6.iuscommunity.org/ius-release.rpm
41+ # RUN yum install -y https://centos7.iuscommunity.org/ius-release.rpm
3642RUN yum install -y python36u
3743RUN yum install -y python36u-pip
3844RUN yum install -y python36u-devel
@@ -53,6 +59,8 @@ RUN pip3.6 install -r requirements.txt
5359# clean everything
5460RUN rm -rf /root/*
5561
56- # cmd command
57- # CMD /bin/bash
58- ENTRYPOINT /usr/sbin/init
62+ # centos6
63+ CMD /bin/bash
64+
65+ # centos7
66+ # ENTRYPOINT /usr/sbin/init
You can’t perform that action at this time.
0 commit comments