Skip to content

Commit 1fa0a3a

Browse files
committed
Merge remote-tracking branch 'origin/stable' into hotfix-0.5.1
2 parents 7bf9969 + c2129c3 commit 1fa0a3a

File tree

2 files changed

+61
-23
lines changed

2 files changed

+61
-23
lines changed

README.md

Lines changed: 60 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,85 @@
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+
1717

18+
## Examples
1819

19-
### Whant more ? Openldap & phpLDAPadmin in 2''
20+
### OpenLDAP & phpLDAPadmin in 1''
2021

21-
to be completed :)
22+
### HTTPS
2223

24+
#### Use autogenerated certificate
25+
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.
2326

24-
## Available Configuration Parameters
27+
docker run -e SERVER_NAME=phpldapadmin.my-compagny.com -d osixia/phpldapadmin
2528

26-
## Examples
29+
#### Use your own certificate
30+
31+
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)).
32+
33+
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 :
34+
35+
docker run -v /path/to/certifates:/osixia/phpldapadmin/apache2/ssl \
36+
-e SSL_CRT_FILENAME=my-phpldapadmin.crt \
37+
-e SSL_KEY_FILENAME=my-phpldapadmin.key \
38+
-e SSL_CA_CRT_FILENAME=the-ca.crt \
39+
-d osixia/phpldapadmin
40+
41+
Ommit the -e SSL_CA_CRT_FILENAME variable for self signed certificates
42+
43+
#### Disable HTTPS
44+
Add -e HTTPS=false to the run command :
45+
46+
docker run -e HTTPS=false -d osixia/phpldapadmin
47+
48+
## Environment Variables
49+
50+
## Manual build
51+
52+
Clone this project :
53+
54+
git clone https://github.com/osixia/docker-phpLDAPadmin
55+
cd docker-mariadb
2756

28-
### Customise self signed certificat
57+
Adapt Makefile, set your image NAME and VERSION, for example :
2958

30-
### Use your own ssl certificat
59+
NAME = osixia/phpldapadmin
60+
VERSION = 0.5.0
61+
62+
becomes :
63+
NAME = billy-the-king/phpldapadmin
64+
VERSION = 0.1.0
3165

32-
### Get phpLDAPadmin using TLS
66+
Build your image :
67+
68+
make build
69+
70+
Run your image :
3371

72+
docker run -d billy-the-king/phpldapadmin:0.1.0
3473

35-
## Do it yourself
74+
## Tests
3675

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

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

44-
Build image
82+
make test
4583

46-
sudo docker build -t phpldapadmin .
84+
4785

image/service/phpldapadmin/assets/apache2/phpldapadmin-ssl.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
SSLCertificateFile /osixia/phpldapadmin/apache2/ssl/${SSL_CRT_FILENAME}
2020
SSLCertificateKeyFile /osixia/phpldapadmin/apache2/ssl/${SSL_KEY_FILENAME}
21-
#SSLCACertificateFile /osixia/phpldapadmin/apache2/ssl/${SSL_CA_CRT_FILENAME
21+
#SSLCACertificateFile /osixia/phpldapadmin/apache2/ssl/${SSL_CA_CRT_FILENAME}
2222

2323
<Directory /var/www/phpldapadmin/htdocs >
2424
Require all granted

0 commit comments

Comments
 (0)