Installing the Joomla image

dockerJoomla has an official image for Docker. This article describes how to deploy it with Docker Compose.


This docker-compose.yml file will create Joomla website, and can be deployed using Portainer.

  1. Start by logging on to Portainer.
  2. Select Stacks in the left pane.
  3. Click the Add Stack button.
  4. Give your stack a Name (e.g. Joomla).
  5. Select Web Editor, and paste the following docker-compose.yml file.
  6. Click Deploy the stack button.
version: '2' services: joomla: image: joomla restart: always ports: - 8080:80 environment: JOOMLA_DB_HOST: joomladb JOOMLA_DB_PASSWORD: example joomladb: image: mysql:5.6 restart: always environment: MYSQL_ROOT_PASSWORD: example

image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
restart: always
- 8081:80
- /sessions


Joomla install

You will now be able to browse to the IP address of your Docker server as follows:

  • http://IP_ADDRESS:8080

From here you can install Joomla in the usual way. The MySQL database details are:

  • Host Name: joomladb
  • Username: root
  • Password: example
  • Database name: your_db



You can access phpMyAdmin by browsing to:

  • http://IP_ADDRESS:8081


File management

Using Portainer, you can access the exec console for the joomla container, and you will be in the /var/www/html folder. You will find vi useful for editing files. Run the following commands to install it.

# apt-get update
# apt-get install vim



Thanks for visiting,