搭建nginx出问题查询的帖子:
1.docker中部署nginx镜像挂载文件夹和文件并解决出错 https://blog.csdn.net/qq_42114918/article/details/85238011 2.Docker安装nginx以及负载均衡 https://www.cnblogs.com/xishaohui/p/8871994.html 3.Docker 运行 nginx -v 设置容器数据卷遇到的问题 https://bbs.csdn.net/topics/392691885 4.利用docker部署nginx https://blog.csdn.net/qq_40513881/article/details/84945275 5.docker部署nginx并且挂载文件夹和文件 https://blog.csdn.net/qq_26614295/article/details/80505246 6.Win10家庭版下docker挂载硬盘挂载不上 https://segmentfault.com/q/1010000009469821/a-1020000009471289 ps:配置default设置后,没解决,还是报的文件映射到文件夹上 349错误
7.Docker nginx安装与文件挂载 https://blog.csdn.net/cml_blog/article/details/80148094 ps:同6,设置了没解决,原帖是6 有用的命令: 执行docker-machine restart default重启docker 执行 docker-machine ssh default 进入docker容器中 执行mount命令查看挂载情况
8.windows版docker安装nginx,并设置目录挂载 https://www.cnblogs.com/alice-cj/p/13235249.html ps:按照8只挂载html目录的话,容器创建成功后/usr/share/nginx/html目录下无50x.html和index.html文件。在宿主机下配置及复制到容器目录下这两个文件,修改宿主机文件仍没产生关联,问题没解决
9.docker 安装nginx,设置目录挂载 https://blog.csdn.net/qq_36635434/article/details/106711434 ps:方法一有效,即进入容器修改index.html文件或修改宿主机文件覆盖容器内部文件。方法二目录挂载同8.无效
10.使用VirtualBox+Docker搭建可移植的Linux开发环境 https://www.jianshu.com/p/7ca57e4f66c5 ps:干货,留着看
11.Docker中运行nginx并挂载本地目录到镜像中 https://blog.csdn.net/wuzhangweiss/article/details/88932691?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param ps:最详细步骤但没用:报错 D:\tools\DockerToolbox\docker.exe: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused “process_linux.go:449: container init caused “rootfs_linux.go:58: mounting \”/D/docker/nginx/conf/nginx.conf\” to rootfs \"/mnt/sda1/var/lib/docker/overlay2/0601f2b4ca641e5e0d4fc78e13f3267b88a2c03f4be6092d67f6fc567368b395/merged\" at \"/mnt/sda1/var/lib/docker/overlay2/0601f2b4ca641e5e0d4fc78e13f3267b88a2c03f4be6092d67f6fc567368b395/merged/etc/nginx/nginx.conf\" caused \“not a directory\”"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type.
12.关于Docker目录挂载的总结 https://www.cnblogs.com/ivictor/p/4834864.html ps:干货,留着看