编译安装部署网站,存储卷挂载
作者:互联网
基于容器的方式做一个apache编译安装的镜像,要求通过此镜像能够部署一个web站点, 站点的内容去源码
之家找,通过存储卷挂载到容器里面,最后成功访问
[root@slave ~]# cd web/
[root@slave web]# ls
chuzhen.html images js kexue.html pic zhuanjia.html
css index.html keshi.html kexuelist.html rongyu.html
html5大气医院网站源码 jianjie.html keshimx.html news.html uploadfiles
html5大气医院网站源码.zip jiuzhen.html keshiys.html newslist.html ys.html
[root@slave web]# rm html5大气医院网站源码
rm: cannot remove 'html5大气医院网站源码': Is a directory
[root@slave web]# rm -rf html5大气医院网站源码
[root@slave web]# rm -rf html5大气医院网站源码.zip
[root@slave web]# ls
chuzhen.html index.html js keshiys.html news.html rongyu.html zhuanjia.html
css jianjie.html keshi.html kexue.html newslist.html uploadfiles
images jiuzhen.html keshimx.html kexuelist.html pic ys.html
[root@slave web]#
[root@slave ~]# docker run -d --name web -v /root/web:/usr/local/apache/htdocs -p 80:80 ac64e3db3533
976673e6880695af78e787da236b34d77bc6cbc07cf36f412dfc19f3d87bd190
[root@slave ~]# ss -antl
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 0.0.0.0:80 0.0.0.0:*
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 128 [::]:80 [::]:*
LISTEN 0 128 [::]:22 [::]:*
标签:web,存储,slave,0.0,编译,html,挂载,root,源码 来源: https://www.cnblogs.com/marymary/p/16575669.html