FROM nginx:1.25.3-alpine RUN mkdir /docroot \ && chgrp -R 0 /etc/nginx \ && chmod -R g+rwX /etc/nginx \ # support running as arbitrary user which belongs to the root group \ && chmod g+rwx /var/cache/nginx /var/run /var/log/nginx \ # comment user directive as master process is run as different user anyhow \ && sed -i.bak 's/^user/#user/' /etc/nginx/nginx.conf COPY nginx.vh.default.conf.nginx /etc/nginx/conf.d/default.conf COPY build/site /docroot RUN echo ls /usr/share/nginx/html \ && ls -lisa /usr/share/nginx/html RUN chown -R nginx: /docroot EXPOSE 8080