Skip to content

Commit e4954ad

Browse files
committed
Update README.md
1 parent 2187415 commit e4954ad

File tree

1 file changed

+67
-15
lines changed

1 file changed

+67
-15
lines changed

README.md

Lines changed: 67 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1-
# docker-phpLDAPadmin
1+
# osixia/phpldapadmin
2+
3+
A docker image to run phpLDAPadmin.
4+
> [phpldapadmin.sourceforge.net](http://phpldapadmin.sourceforge.net)
25
3-
A docker image to run phpLDAPadmin
46

57
## Quick start
68

7-
### Get phpLDAPadmin in 1''
8-
Run docker container with your custom environment variables :
9+
Run a phpLDAPadmin docker image by replacing `ldap.example.com` with your ldap host or IP :
910

1011
sudo docker run -p 443:443 \
11-
-e LDAP_HOST=ldap.example.com \
12-
-e LDAP_BASE_DN=dc=example,dc=com \
13-
-e LDAP_LOGIN_DN=cn=admin,dc=example,dc=com \
12+
-e LDAP_HOSTS=ldap.example.com \
1413
-d osixia/phpldapadmin
1514

16-
phpLDAPadmin should be running on https://localhost
15+
That's it :) you can access phpLDAPadmin on **https://localhost**
16+
17+
18+
## Examples
19+
20+
### OpenLDAP & phpLDAPadmin in 1''
1721

1822

1923
### Whant more ? Openldap & phpLDAPadmin in 2''
@@ -31,17 +35,65 @@ to be completed :)
3135

3236
### Get phpLDAPadmin using TLS
3337

38+
### HTTPS
39+
40+
#### Use autogenerated certificate
41+
By default HTTPS is enable, a certificate is created for the CN (common name) example.org. To work properly on your server adjust SERVER_NAME environment variable to match the phpLDAPadmin server CN.
42+
43+
docker run -e SERVER_NAME=phpldapadmin.my-compagny.com -d osixia/phpldapadmin
44+
45+
#### Use your own certificate
46+
47+
Add your custom certificate, private key and CA certificate in the directory **image/service/phpldapadmin/assets/apache2/ssl** adjust filename in **image/env.yml** and rebuild the image ([see manual build](#manual-build)).
48+
49+
Or you can set your custom certificate at run time, by mouting your a directory containing thoses files to **/osixia/phpldapadmin/apache2/ssl** and adjust there name with the following environment variables :
50+
51+
docker run -v /path/to/certifates:/osixia/phpldapadmin/apache2/ssl \
52+
-e SSL_CRT_FILENAME=my-phpldapadmin.crt \
53+
-e SSL_KEY_FILENAME=my-phpldapadmin.key \
54+
-e SSL_CA_CRT_FILENAME=the-ca.crt \
55+
-d osixia/phpldapadmin
56+
57+
Ommit the -e SSL_CA_CRT_FILENAME variable for self signed certificates
58+
59+
#### Disable HTTPS
60+
Add -e HTTPS=false to the run command :
61+
62+
docker run -e HTTPS=false -d osixia/phpldapadmin
63+
64+
## Manual build
65+
66+
Clone this project :
67+
68+
git clone https://github.com/osixia/docker-phpLDAPadmin
69+
cd docker-mariadb
70+
71+
Adapt Makefile, set your image NAME and VERSION, for example :
72+
73+
NAME = osixia/phpldapadmin
74+
VERSION = 0.5.0
75+
76+
becomes :
77+
NAME = billy-the-king/phpldapadmin
78+
VERSION = 0.1.0
79+
80+
Build your image :
81+
82+
make build
83+
84+
Run your image :
85+
86+
docker run -d billy-the-king/phpldapadmin:0.1.0
3487

35-
## Do it yourself
88+
## Tests
3689

37-
### Build image
90+
We use **Bats** (Bash Automated Testing System) to test this image:
3891

39-
Clone the repository
92+
> [https://github.com/sstephenson/bats](https://github.com/sstephenson/bats)
4093
41-
git clone https://github.com/osixia/docker-phpLDAPadmin
42-
cd docker-phpLDAPadmin
94+
Install Bats, and in this project directory run :
4395

44-
Build image
96+
make test
4597

46-
sudo docker build -t phpldapadmin .
98+
4799

0 commit comments

Comments
 (0)