It has autoindex on
specified by default.
Can be accessed via HTTP with port 8000
, should be bound to the 0.0.0.0
IP address.
docker run --rm -it -p 8000:80 -v $PWD:/mnt/data nginx /bin/bash -c "echo $'server {\nlisten 80;\nserver_tokens off;\n\nlocation / {\nalias /mnt/data/;\nexpires -1;\nautoindex on;\ndefault_type text/plain;\n}\n}' > /etc/nginx/conf.d/default.conf; nginx -g 'daemon off;'"
ip addr show | grep inet | grep -v inet6 | cut -d'/' -f1 | awk '{print "http://"$2":8000"}'