Skip to content

Commit 5477a83

Browse files
committed
update docker
1 parent 2280e78 commit 5477a83

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

Docker/Dockerfile

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
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
712
MAINTAINER xianhu <[email protected]>
813

914
# change system environments
@@ -32,7 +37,8 @@ RUN yum install -y sqlite-devel
3237
RUN 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
3642
RUN yum install -y python36u
3743
RUN yum install -y python36u-pip
3844
RUN yum install -y python36u-devel
@@ -53,6 +59,8 @@ RUN pip3.6 install -r requirements.txt
5359
# clean everything
5460
RUN 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

0 commit comments

Comments
 (0)