File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Dockerfile by xianhu: build a docker image
2- # docker build --rm -t xianhu/centos:v7.8.4 .
32
4- # 普通进入
5- # docker run -it --name test [-p -v] xianhu/centos:v7.8.4 /bin/bash
6- # docker attach test (ctrl+p/q即可退出,attach重新进入)
3+ # 构建镜像
4+ # docker build --rm -t xianhu/centos:v7.8.5 .
75
86# 特权进入
9- # docker run -it -- name test [-p -v] -d --privileged=true xianhu/centos:v7.8.4
7+ # docker run -- name test [-p -v] -d --privileged=true xianhu/centos:v7.8.5
108# docker exec -it test /bin/bash (不能使用attach进入,退出直接exit即可)
9+ # docker exec test pwd (也可以直接执行命令)
1110
1211# 基础镜像
1312FROM centos:7.8.2003
@@ -47,13 +46,13 @@ WORKDIR /root/
4746RUN tar xvzf Python-3.8.12.tgz
4847WORKDIR /root/Python-3.8.12/
4948RUN ./configure && make && make install
50- WORKDIR /root/
5149
5250# clean root and yum cache
51+ WORKDIR /root/
5352RUN rm -rf /root/* && yum clean all
5453
55- # RUN python3 -m pip install --upgrade pip -i http://pypi.douban.com/simple/
56- # RUN python3 -m pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/
54+ # expose
55+ EXPOSE 8088
5756
5857# entry
5958CMD /usr/sbin/init
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments