Docker volume is empty, not picking up any files

I’m trying to set up Docker locally (and eventually in production), but right now, I can’t even get volumes mounted right. I have been following this tutorial, which is clearly outdated since Docker has been changing so rapidly for the past year, tutorials and git issues can not keep up.

My question is, where is my index.php file in my docker container? Why isn’t it showing up, despite being specified in my volumes directive? I even enabled autoindex in my nginx config so I could actually see the directory and prove my suspicions.

  • how to set the service mode when using docker compose?
  • Is it possible to deploy Docker containers using Netflix's Spinnaker?
  • Docker daemon start error on ubuntu 12.04
  • Settings up remote interpretor in pycharm for docker
  • Deploy Heroku Process Types to individual apps
  • Unable to push docker image to Openshift Origin Docker registry
  • I’m on Windows 10

    Here’s my directory tree:

            -default.conf (nginx config)
        -index.php (trying to hit this in browser)

    Here is my docker-compose file:

        build: ./nginx/
            - 80:80
            - php
            - .:/var/www/html
        image: php:5.6-fpm
            - 9000
            - .:/var/www/html

    And my Dockerfile:

    FROM nginx:latest
    MAINTAINER My Name <>
    COPY ./default.conf /etc/nginx/conf.d/default.conf

    Then I run:

    D:\Projects\myproject> docker-compose up -d (--build if I've made changes)

    And then I hit localhost and get the nginx welcome page. But index.php isn’t there! What gives? Please school me, thanks in advance.

  • nginx configuration: 405 not allowed?
  • docker-compose psql could not connect to server
  • Is it possible to launch a new Docker container from within a running Docker container using Docker Compose?
  • How to connect to remote docker running on Ubuntu host
  • AngularJS and NodeJS app in Docker
  • Calling a service running in a docker container from an angular2 app
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.