We assume that you have a running Docker Community Edition installed.
git clone https://github.com/lansuite/lansuite.git cd lansuite touch ./inc/base/config.php # Add the content of the example configuration file below into ./inc/base/config.php chmod 0777 ./inc/base/config.php chmod -R 0777 ./ext_inc/ docker-compose up docker-compose run php composer install
This will start a Nginx webserver with a php-fpm configuration and a MySQL database for you.
After everything started you should be able to visit http://
<Your-Docker-IP>:8080/ and see a running LanSuite-System.
Warning: This Docker setup should not be used for production. It contains a debugging setup like Xdebug.
Docker with a database dump
If you have already a running website based on LanSuite, you can also start a docker based setup with a copy of your database. It comes handy to test the new features with your dataset.
Move your database dump into the root folder of LanSuite and name it
$ mv /your/db/dump.sql /lansuite/copy/database-dump.sql
After this, you can start the docker-compose setup via
$ docker-compose -f docker-compose.yml -f docker-compose.dump.yml up
ERROR: Couldn't connect to Docker daemon
Some distributions (e.g. Fedora) restrict access to the docker daemon socket to user
rootonly. This results in a error message as
ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?Run the two
docker-composecommands as user
sudo) in that case.
ERROR: for web Cannot start service web
A different issue exists in Docker for Windows: If you get an error like:
ERROR: for web Cannot start service web: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused \"rootfs_linux.go:58: mounting \\\"/c/xampp/htdocs/lansuite/.docker/nginx-development.conf\\\" to rootfs \\\"/mnt/sda1/var/lib/docker/aufs/mnt/a302993ced4b16d16c0ab56c001d97fbdb9742f2f5beff079b18be797e95ff2a\\\" at \\\"/mnt/sda1/var/lib/docker/aufs/mnt/a302993ced4b16d16c0ab56c001d97fbdb9742f2f5beff079b18be797e95ff2a/etc/nginx/conf.d/default.conf\\\" caused \\\"not a directory\\\"\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected typeThen you need to enable drive sharing for the host drive the docker image is stored on as described on Fix the Host Volume Sharing issue.
ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version.
docker-composeversion is most likely outdated. Currently LanSuite uses the Compose file format v3.0, hence you need at least Compose version 1.10.0 or higher. If you have installed it using your distribution's package manager please uninstall it and follow the official installation guide on how to install a more-recent version.