docker 使用数据卷部署nginx容器
使用数据卷部署nginx容器
创建目录放置配置文件和我也内容
//创建存放页面内容和配置文件目录
[root@localhost ~]# mkdir /var/www/html -p
[root@localhost ~]# mkdir /config
[root@localhost html]# ls
index.html 天猫tmall.com--理想生活上天猫_files
利用yum下载nginx,然后把配置文件全部移动到刚刚创建的/config目录中
[root@localhost ~]# yum -y install nginx
上次元数据过期检查:4:08:13 前,执行于 2021年12月07日 星期二 14时28分44秒。
依赖关系解决。
====================================================================
软件包 架构 版本 仓库 大小
====================================================================
安装:
nginx x86_64 1:1.14.1-9.module_el8.0.0+184+e34fea82
......
......
[root@localhost nginx]# cp * -r /config/
[root@localhost nginx]# cd /config/
[root@localhost config]#