joomla:4.3.1
from Docker Hub.php cli/joomla.php core:install
inside the container, following the instructions outlined in the Joomla CLI Update documentation.The Joomla installer should run successfully.
The output displays: Install Joomla to run cli commands
. This behavior is expected according to the code found in cli/joomla.php on line 46:
// Check if installed
if (
!file_exists(JPATH_CONFIGURATION . '/configuration.php')
|| (filesize(JPATH_CONFIGURATION . '/configuration.php') < 10)
) {
echo 'Install Joomla to run cli commands' . PHP_EOL;
exit;
}
joomla:4.3.1
from Docker HubAccording to the Installing Joomla via the CLI documentation, it should be possible to install Joomla using Joomla cli. However, this is currently not working because the cli/joomla.php
file checks for the existence of configuration.php
before attempting the installation. This check prevents the installation process when trying to create the configuration.php
file in the first place.
Labels |
Added:
No Code Attached Yet
|
Hi,
According to the Installing Joomla via the CLI documentation
Because you use Docker image please follow the information from the image description. https://hub.docker.com/_/joomla
If I right understood it will "pre install" joomla for you.
For bugs in the image please reaport https://github.com/joomla-docker/docker-joomla/
Title |
|
Labels |
Added:
bug
|
Labels |
Removed:
bug
|
Okay :)
Yes, I think this is a documentation issue. The page provided by @alikon J4.xJoomla CLI Installation is what I was trying to do.
Tested the above documentation page with dockerhub image joomla:4.3.1 and the following bash script, works perfect.
#!/bin/bash
# Load .env
set -o allexport
source .env
set +o allexport
DB_PREFIX=$(LC_CTYPE=C tr -dc '[:alpha:]' < /dev/urandom | head -c 3)_
docker-compose exec -u www-data joomla php installation/joomla.php install \
--site-name=$PROJECTNAME \
--admin-email=$EMAIL \
--admin-user=$JOOMLA_USER \
--admin-username=$JOOMLA_USER \
--admin-password=$JOOMLA_PASSWORD \
--db-type=mysqli \
--db-host=mariadb \
--db-user=$MYSQL_USER \
--db-pass=$MYSQL_PASSWORD \
--db-name=$MYSQL_DATABASE \
--db-prefix=$DB_PREFIX \
--db-encryption=0
Just to clarify If I right understood it will "pre install" joomla for you.
-@Fedik
That statement is not correct, the DockerFile only extracts the zip file and gives you a ready installation (unless the volume is already full then it skips installation).
RUN set -ex; \
curl -o joomla.tar.bz2 -SL {{ env.joomlaPackage }}; \
echo "$JOOMLA_SHA512 *joomla.tar.bz2" | sha512sum -c -; \
mkdir /usr/src/joomla; \
tar -xf joomla.tar.bz2 -C /usr/src/joomla; \
rm joomla.tar.bz2; \
chown -R www-data:www-data /usr/src/joomla
I'm not even sure if it does anything with the ENV it asks for on the dockerhub page. But as you say that's an issue for: https://github.com/joomla-docker/docker-joomla/
My above code could be run from a custom dockerfile instead of docker-compose
Yes, this is a documentation issue with the page: https://docs.joomla.org/J4.x:CLI_Update#Installing_Joomla.21_via_the_CLI
As for a solution, I'm not sure if it should be removed, as I like the idea of a json file.
Labels |
Added:
Documentation Required
|
Labels |
Added:
Feature
|
not an core issue
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-05-06 20:56:30 |
Closed_By | ⇒ | rdeutz |
please follow this https://docs.joomla.org/J4.x:Joomla_CLI_Installation