Installing the Joomla image
Joomla has an official image for Docker. This article describes how to deploy it with Docker Compose.
Portainer
This docker-compose.yml file will create Joomla website, and can be deployed using Portainer.
- Start by logging on to Portainer.
- Select Stacks in the left pane.
- Click the Add Stack button.
- Give your stack a Name (e.g. Joomla).
- Select Web Editor, and paste the following docker-compose.yml file.
- 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
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
environment:
- PMA_ARBITRARY=1
restart: always
ports:
- 8081:80
volumes:
- /sessions
Joomla install
You will now be able to browse to the IP address of your Docker server as follows:
- https://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
PHPmyAdmin
You can access phpMyAdmin by browsing to:
- https://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.