Docker Community Forums

Share and learn in the Docker community.

Can't copy project folder on Windows 10 to docker container


(Sirdraake) #1

I’m learning about Docker and trying to up a container using php, apache and Lumen Framework. When I execute the command to build the container, returns success.

The problem is when I open the http://localhost:8080 and the page show me 403 - forbidden on apache. I access the container by ssh and I look on the folder /srv/app/ and there’s no files. I think that the problem is the mapping of the folder root on the host machine Windows.

I’m using Windows 10;

My folder: C:\projetos-mlt\Code\docker-lamp

Anyone can help me?

My Dockerfile

   FROM php:7.2-apache

   LABEL maintainer="rIckSanchez"
   COPY docker/php/php.ini /usr/local/etc/php/
   COPY . /srv/app/
   COPY docker/apache/vhost.conf /etc/apache2/site-available/000-default.conf

My docker-compose

version: "3"
services:
  app:
     build: .
     ports:
        - "8080:80"
     volumes:
        - .:/srv/app