I'm trying to use Docker to replace my current web development workflow. I have installed Docker and Kitematic and trying to use Official Joomla Image to create a new Joomla container.

I managed to create the container but it can't be started. There's error in the container logs said

error: missing JOOMLA_DB_HOST and MYSQL_PORT_3306_TCP environment variables
  Did you forget to --link some_mysql_container:mysql or set an external db
  with -e JOOMLA_DB_HOST=hostname:port?

How can I link/setup the database as mentioned in the logs error? I have opened the joomla documentation page, but the instructions are not really clear.


After doing some trials and errors, I finally managed to run Joomla in Docker using Kitematic (still need to use the cli tough, as not all actions can be completed using Kitematic GUI).

At the moment I created this answer, most of available Kitematic documentations, tutorials and discussion's topics are referred to how to use Kitematic with Docker toolbox, while the Docker itself recommends to use Docker for Mac, the successor of Docker Toolbox (yes, docker development is changing so fast), so this thing slowing down my finding a bit.

When I created the question, I was expecting I will be able to install and run Joomla in Docker by using 100% Kitematic GUI (without touching cli) but lately I found the fact that, due to a Kitematic issue when linking external containers, at the moment, to create and run Joomla container using the Joomla! official image, you will still need to use Docker command line.

So, without further ado, here are my complete steps to install Joomla in Docker using Kitematic

  1. First of all, you will need a mysql container to store your Joomla database (because the official Joomla image doesn't come with mysql included). You can create it by clicking the New button in left sidebar and click the ‘Create’ button available in the mysql box.


  2. Docker then will download necessary files and automatically running up the container when the downloading process is complete.

  3. At this point, you are likely going to get this error message in the console log:

    error: database is uninitialized and password option is not specified You need to specify one of MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD

  4. To fix this, go to the Settings tab and in the Environtement Variables section, add MYSQL_ROOT_PASSWORD as the KEY and enter any text for your password in the VALUE field.



  5. Click Save, then the mysql container should be running properly now

  6. Next, click the ‘Docker CLI’ button in the bottom left of app and when the terminal open up, run this command : docker run --name myjoomla --link mysql:mysql -d joomla (Please note, if you rename your mysql container to something else then you need to change the mysqlpart in the command to : name_of_mysql_container:mysql)

  7. Docker should download the necessary files now and after the downloading process has completed, docker will automatically run the Joomla container. At this point, you are likely going to get this error message in the console log :

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using Set the 'ServerName' directive globally to suppress this message


  1. To fix this, go to the Settings tab and open the Ports tab. Enter a new value for Mac IP Port, let say 8080 and click save.
enter image description here
  2. Your new Joomla container is ready to install now. You can access the new container from your browser by accessing http://localhost:8080 or by clicking the open url button in the Web Preview box of Kitematic interface.
  3. Follow the Joomla installation steps as usual. But please note in the Database Configuration tab, you will need to enter your mysql container name for the Host Name field, instead of localhost and in this case we will use mysql

kitematic 5

  1. That’s all, Your Joomla is ready.
  2. To enable joomla files editing, you need to enable Volume so all joomla files will be copied to your local computer, by clicking on the Volumes Box in the bottom right of app

kitematic 7 (Please note, enabling volume mounting will reset existing joomla installation)

  1. Extra Step. You probably will need phpmyadmin to manage the database. To create that one, click the Docker Cli button again (due to Kitematic issue with link action I mentioned above, creating new phpmyadmin container using Kitematic GUI will results some issues) and run this command : docker run --name myphpadmin -d --link mysql:db -p 8081:80 phpmyadmin/phpmyadmin . That's it. You can access the new phpmyadmin installation from http://localhost:8081
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.