docker.recipes

Joomla

beginner

Popular open-source CMS for building websites and apps.

Overview

Joomla is a powerful open-source Content Management System (CMS) first released in 2005, built on PHP and designed for creating sophisticated websites, online applications, and web services. Unlike simpler CMS platforms, Joomla excels at complex content hierarchies, multi-user workflows, and advanced access control systems, making it the preferred choice for corporate websites, online magazines, e-commerce platforms, and community portals that require robust user management and content organization capabilities. This Docker stack combines Joomla 5 with Apache web server and MySQL 8.0 database to create a complete web publishing platform. The MySQL database stores all content, user accounts, configuration settings, and extension data, while Joomla's PHP-based architecture handles content rendering, user authentication, and administrative functions. The Apache server efficiently serves both dynamic PHP content and static assets like images and CSS files, creating a high-performance web publishing environment. Web developers, digital agencies, and organizations managing complex websites will find this combination particularly valuable for projects requiring sophisticated content workflows, multi-language support, or extensive user role management. Educational institutions, government agencies, and corporate intranets often choose Joomla for its enterprise-grade security features, built-in SEO optimization, and ability to handle thousands of articles with complex categorization schemes that would overwhelm simpler CMS platforms.

Key Features

  • Joomla 5's new Child Templates system for easier theme customization without losing updates
  • MySQL 8.0's improved JSON data type support for storing Joomla's flexible custom field configurations
  • Built-in Joomla Smart Search with MySQL full-text indexing for powerful site-wide content discovery
  • Joomla's Advanced Content Manager with MySQL-backed version control and content scheduling
  • Native multilingual content management with MySQL collation support for international character sets
  • Joomla's granular Access Control Lists (ACL) with MySQL-optimized user group hierarchies
  • Integrated Joomla Web Services API with MySQL transaction support for headless CMS functionality
  • Joomla's Workflow system powered by MySQL triggers for complex content approval processes

Common Use Cases

  • 1Corporate websites requiring complex content hierarchies and department-based access controls
  • 2Online magazines and news portals with multiple authors, editors, and publication workflows
  • 3Educational institution websites with course catalogs, faculty directories, and student portals
  • 4Government agency sites requiring WCAG compliance, multilingual support, and secure document management
  • 5Community portals with user registration, forums, event calendars, and member directories
  • 6E-commerce sites using Joomla with VirtueMart or HikaShop extensions for complex product catalogs
  • 7Membership organizations managing dues, events, and member communications through Joomla extensions

Prerequisites

  • Minimum 1GB RAM for MySQL database operations and Joomla's PHP processing requirements
  • Port 8080 available for accessing the Joomla web interface during setup and operation
  • Understanding of Joomla's article/category structure and user group permissions system
  • Familiarity with Joomla Extension Directory (JED) for selecting appropriate plugins and templates
  • Basic knowledge of MySQL database concepts for backup procedures and performance optimization
  • Docker environment with at least 2GB disk space for Joomla files and MySQL data growth

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 joomla:
3 image: joomla:5-apache
4 container_name: joomla
5 restart: unless-stopped
6 environment:
7 JOOMLA_DB_HOST: mysql
8 JOOMLA_DB_USER: ${MYSQL_USER}
9 JOOMLA_DB_PASSWORD: ${MYSQL_PASSWORD}
10 JOOMLA_DB_NAME: ${MYSQL_DATABASE}
11 volumes:
12 - joomla_data:/var/www/html
13 ports:
14 - "8080:80"
15 depends_on:
16 - mysql
17 networks:
18 - joomla-network
19
20 mysql:
21 image: mysql:8.0
22 container_name: joomla-mysql
23 environment:
24 MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
25 MYSQL_DATABASE: ${MYSQL_DATABASE}
26 MYSQL_USER: ${MYSQL_USER}
27 MYSQL_PASSWORD: ${MYSQL_PASSWORD}
28 volumes:
29 - mysql_data:/var/lib/mysql
30 networks:
31 - joomla-network
32
33volumes:
34 joomla_data:
35 mysql_data:
36
37networks:
38 joomla-network:
39 driver: bridge

.env Template

.env
1MYSQL_ROOT_PASSWORD=rootpassword
2MYSQL_DATABASE=joomla
3MYSQL_USER=joomla
4MYSQL_PASSWORD=changeme

Usage Notes

  1. 1Docs: https://docs.joomla.org/
  2. 2Access at http://localhost:8080 - complete installation wizard
  3. 3Database host: mysql, database/user from env vars
  4. 4Joomla Extensions Directory (JED) for plugins and templates
  5. 5Admin area at /administrator
  6. 6Built-in multilingual, access control, and workflow features

Individual Services(2 services)

Copy individual services to mix and match with your existing compose files.

joomla
joomla:
  image: joomla:5-apache
  container_name: joomla
  restart: unless-stopped
  environment:
    JOOMLA_DB_HOST: mysql
    JOOMLA_DB_USER: ${MYSQL_USER}
    JOOMLA_DB_PASSWORD: ${MYSQL_PASSWORD}
    JOOMLA_DB_NAME: ${MYSQL_DATABASE}
  volumes:
    - joomla_data:/var/www/html
  ports:
    - "8080:80"
  depends_on:
    - mysql
  networks:
    - joomla-network
mysql
mysql:
  image: mysql:8.0
  container_name: joomla-mysql
  environment:
    MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
    MYSQL_DATABASE: ${MYSQL_DATABASE}
    MYSQL_USER: ${MYSQL_USER}
    MYSQL_PASSWORD: ${MYSQL_PASSWORD}
  volumes:
    - mysql_data:/var/lib/mysql
  networks:
    - joomla-network

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 joomla:
5 image: joomla:5-apache
6 container_name: joomla
7 restart: unless-stopped
8 environment:
9 JOOMLA_DB_HOST: mysql
10 JOOMLA_DB_USER: ${MYSQL_USER}
11 JOOMLA_DB_PASSWORD: ${MYSQL_PASSWORD}
12 JOOMLA_DB_NAME: ${MYSQL_DATABASE}
13 volumes:
14 - joomla_data:/var/www/html
15 ports:
16 - "8080:80"
17 depends_on:
18 - mysql
19 networks:
20 - joomla-network
21
22 mysql:
23 image: mysql:8.0
24 container_name: joomla-mysql
25 environment:
26 MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
27 MYSQL_DATABASE: ${MYSQL_DATABASE}
28 MYSQL_USER: ${MYSQL_USER}
29 MYSQL_PASSWORD: ${MYSQL_PASSWORD}
30 volumes:
31 - mysql_data:/var/lib/mysql
32 networks:
33 - joomla-network
34
35volumes:
36 joomla_data:
37 mysql_data:
38
39networks:
40 joomla-network:
41 driver: bridge
42EOF
43
44# 2. Create the .env file
45cat > .env << 'EOF'
46MYSQL_ROOT_PASSWORD=rootpassword
47MYSQL_DATABASE=joomla
48MYSQL_USER=joomla
49MYSQL_PASSWORD=changeme
50EOF
51
52# 3. Start the services
53docker compose up -d
54
55# 4. View logs
56docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/joomla/run | bash

Troubleshooting

  • Error 'Database connection failed' during setup: Verify MySQL container is fully started before accessing Joomla installer, wait 30-60 seconds after docker-compose up
  • Joomla installer shows 'MySQL version not supported': Ensure environment variables MYSQL_USER and MYSQL_PASSWORD match between joomla and mysql services
  • Apache error 'Permission denied' for Joomla files: Check that joomla_data volume has correct ownership, may need to rebuild container with proper user permissions
  • Slow page loading after installation: Increase MySQL buffer pool size by adding MYSQL_INNODB_BUFFER_POOL_SIZE environment variable to mysql service
  • Joomla admin area returns 404 errors: Ensure Apache mod_rewrite is enabled and .htaccess files are properly configured in the joomla container
  • Extension installation fails with 'Upload failed': Increase PHP upload limits by mounting custom php.ini with higher upload_max_filesize and post_max_size values

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space