I recommend to clone this repo and create an own image for having an actual nginx-image
Create an own image
cd <directory with Dockerfile>
docker build -t autoindex .
A branch of nginx:latest with autoindex on.
Serves all files in /usr/share/nginx/html
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
location / {
root /usr/share/nginx/html;
autoindex on;
}
docker run --name=web -p 80:80 -h web -v path_web_site:/usr/share/nginx/html -d jorgeandrada/nginx-autoindex