diff --git a/apps/demo/404.html b/apps/demo/404.html new file mode 100644 index 0000000..570240d --- /dev/null +++ b/apps/demo/404.html @@ -0,0 +1,12 @@ + +404 Not Found + +

404 Not Found

+ + + + + + + + \ No newline at end of file diff --git a/build/app-demo/Dockerfile b/build/app-demo/Dockerfile index 10be8c4..4ddd73d 100644 --- a/build/app-demo/Dockerfile +++ b/build/app-demo/Dockerfile @@ -14,14 +14,16 @@ RUN rm -rf ./* # Copy assets over so Nginx can properly serve COPY apps/demo/index.html . +COPY apps/demo/404.html . RUN chown -R nginx:nginx /usr/share/nginx/html # implement changes required to run NGINX as an unprivileged user RUN sed -i 's,listen 80;,listen 8080;,' /etc/nginx/conf.d/default.conf \ + && sed -i 's,#error_page 404,error_page 404,' /etc/nginx/conf.d/default.conf \ && sed -i '/user nginx;/d' /etc/nginx/nginx.conf \ && sed -i 's,/var/run/nginx.pid,/tmp/nginx.pid,' /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 \ + && 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 server_tokens off;\n" /etc/nginx/nginx.conf \ # nginx user must own the cache and etc directory to write cache and tweak the nginx config && chown -R $UID:0 /var/cache/nginx \ && chmod -R g+w /var/cache/nginx \