Docker Start plugin
A plugin to start Magnolia using Docker and display the logs.
| Package name | 
 | 
| Repository link | |
| Latest version | |
| Changelog link | 
By default, the docker-start command checks for Docker and Docker Compose, generates a docker-compose.yml file, starts the services in detached mode, watches for changes in webapps and light-modules folder, and shows logs with color-coded prefixes per service.
| Use the Jumpstart plugin (see: Jumpstarting a project) to create a project directory. | 
Installing
The plugin doesn’t come pre-installed with Magnolia CLI.
You must add it to the mgnl.config.js project file.
| The plugin is installed automatically by the Jumpstart plugin if it is defined in a project template. | 
With add-plugin
Run the following command in the project folder.
npm run mgnl -- add-plugin @magnolia/cli-docker-start-plugin| Windows users using PowerShell must enclose the two consecutive hyphens (  | 
The command automatically downloads, installs, and registers the plugin in the mgnl.config.js file.
Usage
Options
| Form (short and long) | Description | 
|---|---|
| 
 
 | Regenerates the  | 
| 
 
 | Sets the path to the  | 
| 
 
 | Sets the path to the  | 
| 
 
 | Displays the version. | 
| 
 
 | Displays help information. | 
Examples
Start Magnolia with Docker
npm run mgnl -- docker-start| Windows users using PowerShell must enclose the two consecutive hyphens (  | 
This command checks for Docker and Docker Compose, generates a docker-compose.yml if needed (using Tomcat and light modules paths), starts the services in detached mode, watches for changes, and follows logs with colored output for each service.
| This setup is intended for development purposes only.
The generated docker-compose.ymlis a starting point.
After the initial generation, you can modify it as needed to fit your environment (for example, services, volumes, ports, memory, or other settings). | 
Regenerate docker-compose and start
npm run mgnl -- docker-start --regenerate| Windows users using PowerShell must enclose the two consecutive hyphens (  | 
This command forces regeneration of the docker-compose.yml file before starting the Docker services, which is useful if the paths have changed.
Start with custom Tomcat and light modules paths
npm run mgnl -- docker-start --tomcat "./magnolia/apache-tomcat" --light-modules-path "./magnolia/light-modules"| Windows users using PowerShell must enclose the two consecutive hyphens (  | 
This command starts Docker using the specified Tomcat directory and light modules path, generating or using docker-compose.yml accordingly, and displays colored service logs.
Configuration
You can set the following properties in mgnl.config.js to predefine the plugin’s behavior.
Global properties
| Property name | Description | 
|---|---|
| 
 | The path to a directory containing all light modules. Alternative forms:  | 
Plugin properties
| Property name | Description | 
|---|---|
| 
 | The path to the  Alternative forms:  | 
For more information, see Configuring plugins.