update docker
parent
2280e78fad
commit
5477a83c82
|
@ -1,9 +1,14 @@
|
||||||
# Dockerfile by xianhu: build a docker image
|
# Dockerfile by xianhu: build a docker image
|
||||||
# usage: docker build -t user/centos .
|
# centos6:
|
||||||
# usage: docker run -dt --privileged user/centos
|
# docker build -t user/centos6 .
|
||||||
# usage: docker exec -it containerid /bin/bash
|
# docker run -it --name test [-p -v] user/centos6
|
||||||
|
# docker attach test
|
||||||
|
# centos7:
|
||||||
|
# docker build -t user/centos7 .
|
||||||
|
# docker run -dt --privileged --name test [-p -v] user/centos7
|
||||||
|
# docker exec -it test /bin/bash
|
||||||
|
|
||||||
FROM centos:7
|
FROM centos:6.9
|
||||||
MAINTAINER xianhu <qixianhu@qq.com>
|
MAINTAINER xianhu <qixianhu@qq.com>
|
||||||
|
|
||||||
# change system environments
|
# change system environments
|
||||||
|
@ -32,7 +37,8 @@ RUN yum install -y sqlite-devel
|
||||||
RUN yum install -y openssl-devel
|
RUN yum install -y openssl-devel
|
||||||
|
|
||||||
# install python
|
# install python
|
||||||
RUN yum install -y https://centos7.iuscommunity.org/ius-release.rpm
|
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
|
||||||
RUN yum install -y python36u-pip
|
RUN yum install -y python36u-pip
|
||||||
RUN yum install -y python36u-devel
|
RUN yum install -y python36u-devel
|
||||||
|
@ -53,6 +59,8 @@ RUN pip3.6 install -r requirements.txt
|
||||||
# clean everything
|
# clean everything
|
||||||
RUN rm -rf /root/*
|
RUN rm -rf /root/*
|
||||||
|
|
||||||
# cmd command
|
# centos6
|
||||||
# CMD /bin/bash
|
CMD /bin/bash
|
||||||
ENTRYPOINT /usr/sbin/init
|
|
||||||
|
# centos7
|
||||||
|
# ENTRYPOINT /usr/sbin/init
|
||||||
|
|
Loading…
Reference in New Issue