This is the Git repo of the Docker image for MODX.
- Start docker containers
docker-compose up -d
-
Copy MODX code into
html
folder -
Visit localhost:8000
If you have mysql setup externally and you want to run modx and connect to the external MySQL, follow steps below:
- build modx
docker build -t modx_apache ./apache
-
Copy MODX code into
html
folder -
Run
modx_apache
image assuming MySQL installed locally
docker run -d --network=host --volume "$(pwd)/html:/var/www/html" -e MODX_DB_HOST=127.0.0.1:3306 \
-e MODX_DB_PASSWORD=password \
-e MODX_DB_USER=modx \
-e MODX_DB_NAME=modx \
--name modx_apache modx_apache