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 can I deploy to a specific app with heroku docker:release?
  • Ubuntu docker image doesn't contain any /dev/sdX block devices?
  • Logging events in Kubernetes cluster
  • Docker seems to have no tty?
  • How to convert docker run command into json file?
  • Separate clock process from sidekiq workers on Docker
  • 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.

  • How to setting Core file size in Docker container?
  • File ownership on building docker images
  • How do I share the contents of a file two-way between host and container?
  • What is a docker-compose.yml file?
  • When would I use `--interactive` without `--tty` in a Docker container?
  • How to deploy application to docker container on Linux server?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.