Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit d41a2f2

Browse files
committed
升级dockerfile, 对外暴露端口8088, v7.8.5
1 parent a2c31e1 commit d41a2f2

2 files changed

Lines changed: 7 additions & 57 deletions

File tree

Docker/Dockerfile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
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
# 基础镜像
1312
FROM centos:7.8.2003
@@ -47,13 +46,13 @@ WORKDIR /root/
4746
RUN tar xvzf Python-3.8.12.tgz
4847
WORKDIR /root/Python-3.8.12/
4948
RUN ./configure && make && make install
50-
WORKDIR /root/
5149

5250
# clean root and yum cache
51+
WORKDIR /root/
5352
RUN 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
5958
CMD /usr/sbin/init

Docker/requirements.txt

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)