FROM nextcloud:latest # Change the Apache listening port from 80 to 8080 RUN sed -i 's/Listen 80/Listen 8080/' /etc/apache2/ports.conf && \ sed -i 's/:80/:8080/' /etc/apache2/sites-available/000-default.conf # (Optional) Update the user to run as non-root if that was your goal # USER www-data