Elgg development environment on docker.
- Download or clone the Elgg version you want to work with.
- Run the docker image mounting Elgg as the volume /app. If you're on Windows or OS X
and use boot2docker, remember it mounts your C:\Users or /Users directory in the
dev VM, so adjust paths accordingly.
- There are a number of environment variables that affect how the the container is built.
See below for a list.
- After the container is built, the credentials for Elgg and MySQL are printed
if they weren't supplied via enviroment variables.
- Depending on how you're running docker, you may need to expose ports. You can easily
expose all ports by using
docker run -P ....
- Open the docker vm's IP address and port in your browser. If you're using Kitematic,
just click on the preview image and it will open for you. You can also browse to
/phpmyadmin for a phpmyadmin installation. Check the docker screen for the
mysql root password.
Setting environment vars with
-e VAR="value" in the run command affects the behavior of the installation.
If none are given, defaults are used and output on the screen.
UPDATE_COMPOSERShould composer packages be updated automatically? (Defaults to 1, set to 0 to disable)
MYSQL_USERThe DB username to create
MYSQL_PASSThe DB password to set on the created user
ELGG_DB_HOSTThe DB host Elgg will use
ELGG_DB_USERThe DB user Elgg will use
ELGG_DB_PASSThe DB password Elgg will use
ELGG_DB_PREFIXElgg's DB prefix
ELGG_DB_NAMEThe name of the DB Elgg will use
ELGG_SITE_NAMEElgg's site name
ELGG_SITE_EMAILElgg site email address
ELGG_WWW_ROOTElgg's www_root (Don't change this unless you modify run.sh and the installation)
ELGG_DATA_ROOTThe data_root for Elgg (/media)
ELGG_DISPLAY_NAMEThe display name for the admin user
ELGG_EMAILThe email address for the admin user (must be a well-formed, though not necessarily value, address)
ELGG_USERNAMEThe username of the admin user
ELGG_PASSWORDThe password for the admin user
ELGG_PATHThe location Elgg is installed (Don't change this unless you modify run.sh and the installation)
ELGG_SITE_ACCESSThe default site access
REINSTALLShould Elgg force a reinstall? Defaults to 0. Set to 1 to enable. ENABLING WILL DELETE engine/settings.php AND .htaccess!
/path/to/elgg/clone/ with the actual path to you Elgg clone. Note that this will overwrite your settings.php and htaccess files!
docker run -p 8080:80 -e REINSTALL=1 -e ELGG_PASSWORD='asdfjkl' -v /path/to/elgg/clone/:/app jumbojett/elgg-dev-environment