多克尔卷是空的,没有拿起任何文件
我试图在本地设置Docker(最终在生产中),但是现在,我甚至无法正确安装卷。 我一直在关注这个教程 , 这个教程显然已经过时了,因为在过去的一年中,Docker一直在如此迅速地变化,教程和git问题跟不上。
我的问题是,我的docker容器中的index.php文件在哪里? 为什么不显示,尽pipe在我的卷指令中指定? 我甚至在我的nginxconfiguration文件中启用了autoindex,所以我实际上可以看到目录并certificate我的怀疑。
我在Windows 10上
这是我的目录树:
myproject/ -nginx/ -default.conf (nginx config) -Dockerfile -docker-compose.yml -index.php (trying to hit this in browser)
这是我的docker-compose文件:
nginx: build: ./nginx/ ports: - 80:80 links: - php volumes: - .:/var/www/html php: image: php:5.6-fpm expose: - 9000 volumes: - .:/var/www/html
和我的Dockerfile:
FROM nginx:latest MAINTAINER My Name <me@example.com> COPY ./default.conf /etc/nginx/conf.d/default.conf
然后我运行:
D:\Projects\myproject> docker-compose up -d (--build if I've made changes)
然后我打本地主机,并获得nginx的欢迎页面。 但index.php不在那里! 是什么赋予了? 请提前感谢我的学校。