Skip to content

Commit

Permalink
nginx-non-root: add autoindex
Browse files Browse the repository at this point in the history
  • Loading branch information
eumel8 committed Feb 3, 2025
1 parent 36f60a0 commit f697b50
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nginx-non-root/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ LABEL org.opencontainers.image.source = "https://github.com/mcsps/docker-images"
RUN apk add --update --no-cache bash curl wget git busybox-extras mysql-client && apk upgrade
# implement changes required to run NGINX as an unprivileged user
RUN sed -i -e '/listen/!b' -e '/80;/!b' -e 's/80;/8080;/' /etc/nginx/conf.d/default.conf \
&& sed -i -e '/ index index.html index.htm;/a \ \ \ \ autoindex on;' /etc/nginx/conf.d/default.conf \
&& sed -i -e '/user/!b' -e '/nginx/!b' -e '/nginx/d' /etc/nginx/nginx.conf \
&& sed -i 's!/var/run/nginx.pid!/tmp/nginx.pid!g' /etc/nginx/nginx.conf \
&& sed -i "/^http {/a \ proxy_temp_path /tmp/proxy_temp;\n client_body_temp_path /tmp/client_temp;\n fastcgi_temp_path /tmp/fastcgi_temp;\n uwsgi_temp_path /tmp/uwsgi_temp;\n scgi_temp_path /tmp/scgi_temp;\n" /etc/nginx/nginx.conf
Expand Down

0 comments on commit f697b50

Please sign in to comment.