TrafeX / docker-php-nginx

Docker image with PHP-FPM 8.3 & Nginx 1.26 on Alpine Linux
https://hub.docker.com/r/trafex/php-nginx
MIT License
1.37k stars 736 forks source link

start container with volume under windows 10.x #45

Closed StephanKrauss closed 3 years ago

StephanKrauss commented 4 years ago

Hello,

i'm a beginner in docker. I will include my own scripts. I start the container: docker run -p 80:8080 -v c:/xampp1/htdocs/test/:/var/www/html trafex/alpine-nginx-php7

In my directory 'test' is the index.php.

When i call 'http://localhost/index.php' i get the error '404 Not Found'.

172.17.0.1 - - [13/Jul/2020:12:52:52 +0000] "GET /index.php HTTP/1.1" 404 125 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0" "-" 0.000 - . -

Anybody a idea ?

Your sincerly

Stephan

StephanKrauss commented 4 years ago

Hello,

i hope this is the solution: docker run -p 80:8080 -v C:/test/alpine-php7-webserver/public:/var/www/html erseco/alpine-php7-webserver

Your sincerly

Stephan

TrafeX commented 4 years ago

Hi @StephanKrauss,

So you solved your issue? What solved it? Using erseco/alpine-php7-webserver or changing the path of the volume mount?

PeterOlivera commented 4 years ago

I was able to use it like this

docker run -p 80:8080 -v //C/MyFolder:/var/www/html trafex/alpine-nginx-php7

basically using the //C/MyFolder for the folder I have on C:\MyFolder where my pages are located.

TrafeX commented 3 years ago

Great, glad that it worked!