Docker: /var/www/html empty


I’ve build a custom Dockerfile on top of nextcloud:latest to change the default ports to 10000:

FROM nextcloud:latest

COPY apache2/ports.conf /etc/apache2/ports.conf
COPY apache2/000-default.conf /etc/apache2/sites-available/000-default.conf

RUN service apache2 restart


The apache config files are the same from the official nextcloud:latest image except the change port from 80 to 10000.
The container starts, but if I open the link:
www.domain.tld/nextcloud the result is the following error message:

# Not Found

The requested URL /nextcloud was not found on this server.

Apache/2.4.25 (Debian) Server at domain.tld Port 10000

If I check the directory /var/www/html within the running container,
I see that it is empty.

What is my misunderstanding here?
Thanks a lot for your support :slight_smile:


is nextcloud available in a subfolder /nextcloud?

did you kill the entrypoint statement? that script installs nextcloud during the first start of the container.

and why didn’t you map the ports.conf and 000-default.conf into the running container with -v. You won’t need to build a new image.

just curios: why did you change the port?