Advertisement

Official Docker image: Changing the document root

Need help installing Joomla! 4.x? For all Joomla! 4.x installation issues please use this forum.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
vmb
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Sep 18, 2024 4:39 pm

Official Docker image: Changing the document root

Post by vmb » Wed Sep 18, 2024 5:01 pm

The official joomla:4-apache image installs into /var/www/html in the container. I am using docker-compose with persistent volumes accessible from the host. The official image works fine all I need to do is create a new website in /var/www/html . However, I need to restore an Akeeba backup from a cPanel host into a new Docker container. I can restore onto a bare-metal host without a problem, but not successfully into a Docker container. The only visible difference is the document root.

Is there an easy way to change the document root to install Joomla into /home/customer/public_html instead?

I was hoping that there would be an environment variable like 'APACHE_DOCUMENT_ROOT' but I don't appear to be that lucky. Do I really have to develop my own custom image to change the document root in the Docker container?

Advertisement
User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31291
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Official Docker image: Changing the document root

Post by Per Yngve Berg » Wed Sep 18, 2024 7:17 pm

Docker will have it in the compose.yaml file.

Apache is configured by apache.conf

Advertisement

Post Reply

Return to “Installation Joomla! 4.x”