Use the docker build command:
docker build --rm -t yourname/lemonldap-ng:version .
The image will run LemonLDAP::NG in demo mode (see http://lemonldap-ng.org/documentation/latest/authdemo).
Add auth.example.com/manager.example.com/test1.example.com/test2.example.com to /etc/hosts on the host
echo "127.0.0.1 auth.example.com manager.example.com test1.example.com test2.example.com" | sudo tee -a /etc/hosts
Map the container port 80 to host port 80 (option -p) when you run the container to be able to access it
docker run -d -p 80:80 yourname/lemonldap-ng:version
Then connect to http://auth.example.com with your browser and log in with dwho/dwho.
You may use the following environment variables to configure the container
SSODOMAIN
: change the defaultexample.com
domain with something elseLOGLEVEL
: Set LLNG verbosity (fordocker logs
). Possible values:error
,warn
,notice
,info
,debug
FASTCGI_LISTEN_PORT
: Listen on a port instead of using a UNIX socket. If you use this variable, you will probably want to map this port on your host.PROXY_RANGE
: if LLNG is running behind a reverse proxy, change the nginx configurations forset_real_ip_from
.PROXY_RANGE
will be the IP range of your proxy. ex:172.0.0.0/8
You can also finely set the hostnames for each site
PORTAL_HOSTNAME
: change the defaultauth.example.com
domain with something elseMANAGER_HOSTNAME
: change the defaultmanager.example.com
domain with something elseHANDLER_HOSTNAME
: change the defaultreload.example.com
domain with something elseTEST1_HOSTNAME
: change the defaulttest1.example.com
domain with something elseTEST2_HOSTNAME
: change the defaulttest2.example.com
domain with something else
Example:
docker run -d -e SSODOMAIN=test.local -e LOGLEVEL=debug -p 80:80 yourname/lemonldap-ng:version
Or
docker run -d \
-e SSODOMAIN=test.local \
-e PORTAL_HOSTNAME=myportal.test.local \
-e MANAGER_HOSTNAME=mymanager.test.local \
-e HANDLER_HOSTNAME=myhandler.test.local \
-e TEST1_HOSTNAME=mytest1.test.local \
-e TEST2_HOSTNAME=mytest2.test.local \
-e LOGLEVEL=debug \
-e FASTCGI_LISTEN_PORT=9000 \
-p 80:80 \
-p 9000:9000 \
yourname/lemonldap-ng:version
Don't forget to modify your /etc/hosts
accordingly