Skip to content

Commit 3154079

Browse files
committed
Merge branch 'hotfix-0.6.1' into stable
2 parents 81b1367 + 82bf74e commit 3154079

File tree

15 files changed

+79
-80
lines changed

15 files changed

+79
-80
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.6.1
4+
- Upgrade baseimage: osixia/web-baseimage:0.1.1
5+
- Rename environment variables
6+
37
## 0.6.0
48
- Use new baseimage: osixia/light-baseimage
59

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
NAME = osixia/phpldapadmin
2-
VERSION = 0.6.0
2+
VERSION = 0.6.1
33

44
.PHONY: all build test tag_latest release
55

README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ A docker image to run phpLDAPadmin.
1010
Run a phpLDAPadmin docker image by replacing `ldap.example.com` with your ldap host or IP :
1111

1212
sudo docker run -p 443:443 \
13-
-e LDAP_HOSTS=ldap.example.com \
13+
-e PHPLDAPADMIN_LDAP_HOSTS=ldap.example.com \
1414
-d osixia/phpldapadmin
1515

1616
That's it :) you can access phpLDAPadmin on **https://localhost**
@@ -25,11 +25,11 @@ Example script:
2525
#!/bin/bash -e
2626

2727
# Run a ldap server, save the container id in LDAP_CID and get its IP:
28-
LDAP_CID=$(docker run -h ldap.example.org -d osixia/openldap:1.0.0)
28+
LDAP_CID=$(docker run -h ldap.example.org -d osixia/openldap:1.0.1)
2929
LDAP_IP=$(docker inspect -f "{{ .NetworkSettings.IPAddress }}" $LDAP_CID)
3030

3131
# Run phpLDAPadmin and set ldap host to ldap ip
32-
PHPLDAP_CID=$(docker run -h phpldapadmin.example.org -e LDAP_HOSTS=$LDAP_IP -d osixia/phpldapadmin:0.6.0)
32+
PHPLDAP_CID=$(docker run -h phpldapadmin.example.org -e PHPLDAPADMIN_LDAP_HOSTS=$LDAP_IP -d osixia/phpldapadmin:0.6.1)
3333

3434
# We get phpLDAPadmin container ip
3535
PHPLDAP_IP=$(docker inspect -f "{{ .NetworkSettings.IPAddress }}" $PHPLDAP_CID)
@@ -47,28 +47,28 @@ By default HTTPS is enable, a certificate is created with the container hostname
4747

4848
#### Use your own certificate
4949

50-
Add your custom certificate, private key and CA certificate in the directory **image/service/phpldapadmin/assets/apache2/ssl** adjust filename in **image/env.yaml** and rebuild the image ([see manual build](#manual-build)).
50+
Add your custom certificate, private key and CA certificate in the directory **image/service/phpldapadmin/assets/apache2/certs** adjust filename in **image/env.yaml** and rebuild the image ([see manual build](#manual-build)).
5151

52-
Or you can set your custom certificate at run time, by mouting your a directory containing thoses files to **/container/service/phpldapadmin/assets/apache2/ssl** and adjust there name with the following environment variables :
52+
Or you can set your custom certificate at run time, by mouting your a directory containing thoses files to **/container/service/phpldapadmin/assets/apache2/certs** and adjust there name with the following environment variables :
5353

54-
docker run -v /path/to/certifates:/container/service/phpldapadmin/assets/apache2/ssl \
55-
-e SSL_CRT_FILENAME=my-phpldapadmin.crt \
56-
-e SSL_KEY_FILENAME=my-phpldapadmin.key \
57-
-e SSL_CA_CRT_FILENAME=the-ca.crt \
54+
docker run -v /path/to/certifates:/container/service/phpldapadmin/assets/apache2/certs \
55+
-e PHPLDAPADMIN_HTTPS_CRT_FILENAME=my-phpldapadmin.crt \
56+
-e PHPLDAPADMIN_HTTPS_KEY_FILENAME=my-phpldapadmin.key \
57+
-e PHPLDAPADMIN_HTTPS_CA_CRT_FILENAME=the-ca.crt \
5858
-d osixia/phpldapadmin
5959

60-
Ommit the -e SSL_CA_CRT_FILENAME variable for self signed certificates
60+
Ommit the -e PHPLDAPADMIN_HTTPS_CA_CRT_FILENAME variable for self signed certificates
6161

6262
#### Disable HTTPS
63-
Add -e HTTPS=false to the run command :
63+
Add -e PHPLDAPADMIN_HTTPS=false to the run command :
6464

65-
docker run -e HTTPS=false -d osixia/phpldapadmin
65+
docker run -e PHPLDAPADMIN_HTTPS=false -d osixia/phpldapadmin
6666

6767
## Environment Variables
6868

6969
Environement variables defaults are set in **image/env.yaml**. You can modify environment variable values directly in this file and rebuild the image ([see manual build](#manual-build)). You can also override those values at run time with -e argument or by setting your own env.yaml file as a docker volume to `/etc/env.yaml`. See examples below.
7070

71-
- **LDAP_HOSTS**: Set phpLDAPadmin server config. Defaults to :
71+
- **PHPLDAPADMIN_LDAP_HOSTS**: Set phpLDAPadmin server config. Defaults to :
7272

7373
- ldap.example.org:
7474
- server:
@@ -94,35 +94,35 @@ Environement variables defaults are set in **image/env.yaml**. You can modify en
9494

9595
If you want to set this variable at docker run command convert the yaml in python :
9696

97-
docker run -e LDAP_HOSTS="[{'ldap.example.org': [{'server': [{'tls': True}]},{'login': [{'bind_id': 'cn=admin,dc=example,dc=org'}]}]}, 'ldap2.example.org', 'ldap3.example.org']" -d osixia/phpldapadmin
97+
docker run -e PHPLDAPADMIN_LDAP_HOSTS="[{'ldap.example.org': [{'server': [{'tls': True}]},{'login': [{'bind_id': 'cn=admin,dc=example,dc=org'}]}]}, 'ldap2.example.org', 'ldap3.example.org']" -d osixia/phpldapadmin
9898

9999
To convert yaml to python online :
100100
http://yaml-online-parser.appspot.com/
101101

102102
Apache config :
103-
- **SERVER_ADMIN**: Server admin email. Defaults to `[email protected]`
103+
- **PHPLDAPADMIN_SERVER_ADMIN**: Server admin email. Defaults to `[email protected]`
104104

105-
HTTPS options :
106-
- **HTTPS**: Use apache ssl config. Defaults to `true`
107-
- **SSL_CRT_FILENAME**: Apache ssl certificate filename. Defaults to `phpldapadmin.crt`
108-
- **SSL_KEY_FILENAME**: Apache ssl certificate private key filename. Defaults to `phpldapadmin.key`
109-
- **SSL_CA_CRT_FILENAME**: Apache ssl CA certificate filename. Defaults to `ca.crt`
105+
PHPLDAPADMIN_HTTPS options :
106+
- **PHPLDAPADMIN_HTTPS**: Use apache ssl config. Defaults to `true`
107+
- **PHPLDAPADMIN_HTTPS_CRT_FILENAME**: Apache ssl certificate filename. Defaults to `phpldapadmin.crt`
108+
- **PHPLDAPADMIN_HTTPS_KEY_FILENAME**: Apache ssl certificate private key filename. Defaults to `phpldapadmin.key`
109+
- **PHPLDAPADMIN_HTTPS_CA_CRT_FILENAME**: Apache ssl CA certificate filename. Defaults to `ca.crt`
110110

111111
Ldap client TLS/LDAPS options :
112112

113-
- **USE_LDAP_CLIENT_SSL**: Enable ldap client tls config, ldap serveur certificate check and set client certificate. Defaults to `true`
114-
- **LDAP_REQCERT**: Set ldap.conf TLS_REQCERT. Defaults to `demand`
115-
- **LDAP_CA_CRT_FILENAME**: Set ldap.conf TLS_CACERT to /container/service/phpldapadmin/ssl/$LDAP_CA_CRT_FILENAME. Defaults to `ldap-ca.crt`
116-
- **LDAP_CRT_FILENAME**: Set .ldaprc TLS_CERT to /container/service/phpldapadmin/ssl/$LDAP_CRT_FILENAME. Defaults to `ldap-client.crt`
117-
- **LDAP_KEY_FILENAME**: Set .ldaprc TLS_KEY to /container/service/phpldapadmin/ssl/$LDAP_KEY_FILENAME. Defaults to `ldap-client.key`
113+
- **PHPLDAPADMIN_LDAP_CLIENT_TLS**: Enable ldap client tls config, ldap serveur certificate check and set client certificate. Defaults to `true`
114+
- **PHPLDAPADMIN_LDAP_CLIENT_TLS_REQCERT**: Set ldap.conf TLS_REQCERT. Defaults to `demand`
115+
- **PHPLDAPADMIN_LDAP_CLIENT_TLS_CA_CRT_FILENAME**: Set ldap.conf TLS_CACERT to /container/service/phpldapadmin/assets/ldap-client/certs/$PHPLDAPADMIN_LDAP_CLIENT_TLS_CA_CRT_FILENAME. Defaults to `ldap-ca.crt`
116+
- **PHPLDAPADMIN_LDAP_CLIENT_TLS_CRT_FILENAME**: Set .ldaprc TLS_CERT to /container/service/phpldapadmin/assets/ldap-client/certs/$PHPLDAPADMIN_LDAP_CLIENT_TLS_CRT_FILENAME. Defaults to `ldap-client.crt`
117+
- **PHPLDAPADMIN_LDAP_CLIENT_TLS_KEY_FILENAME**: Set .ldaprc TLS_KEY to /container/service/phpldapadmin/assets/ldap-client/certs/$PHPLDAPADMIN_LDAP_CLIENT_TLS_KEY_FILENAME. Defaults to `ldap-client.key`
118118

119119
More information at : http://www.openldap.org/doc/admin24/tls.html (16.2.2. Client Configuration)
120120

121121
### Set environment variables at run time :
122122

123123
Environment variable can be set directly by adding the -e argument in the command line, for example :
124124

125-
docker run -h phpldapadmin.example.org -e LDAP_HOSTS="ldap.example.org" \
125+
docker run -h phpldapadmin.example.org -e PHPLDAPADMIN_LDAP_HOSTS="ldap.example.org" \
126126
-d osixia/phpldapadmin
127127

128128
Or by setting your own `env.yaml` file as a docker volume to `/etc/env.yaml`

image/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM osixia/web-baseimage:0.1.0
1+
FROM osixia/web-baseimage:0.1.1
22
MAINTAINER Bertrand Gouny <[email protected]>
33

44
# phpLDAPadmin version
@@ -10,7 +10,7 @@ ENV PHPLDAPADMIN_SHA1 669fca66c75e24137e106fdd02e3832f81146e23
1010
CMD ["/container/tool/run"]
1111

1212
# Install apache2 and php5-fpm using osixia/baseimage utils
13-
# Caution: /sbin/add-service-available arguments order is important
13+
# Caution: /container/tool/install-service-available arguments order is important
1414
# php5-fpm install will detect apache2 and configure it
1515

1616
# Download, check integrity and unzip phpLDAPadmin to /var/www/phpldapadmin_bootstrap

image/env.yaml

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
LDAP_HOSTS:
1+
PHPLDAPADMIN_LDAP_HOSTS:
22
- ldap.example.org:
33
- server:
44
- tls: true
@@ -8,25 +8,22 @@ LDAP_HOSTS:
88
- ldap3.example.org
99

1010
# Apache
11-
SERVER_ADMIN: [email protected]
11+
PHPLDAPADMIN_SERVER_ADMIN: [email protected]
1212

1313
# Self signed certificat will be generated
14-
# if HTTPS is set to true and no certificat and key are provided.
14+
# if PHPLDAPADMIN_HTTPS is set to true and no certificat and key are provided.
1515

1616
# To use your custom certificat and key 2 options :
17-
# - add them in service/phpldapadmin/assets/apache2/ssl and build the image
18-
# - or during docker run mount a data volume with thoses files to /container/service/phpldapadmin/assets/apache2/ssl
19-
HTTPS: true
20-
SSL_CRT_FILENAME: phpldapadmin.crt
21-
SSL_KEY_FILENAME: phpldapadmin.key
22-
SSL_CA_CRT_FILENAME: ca.crt
17+
# - add them in service/phpldapadmin/assets/apache2/certs and build the image
18+
# - or during docker run mount a data volume with thoses files to /container/service/phpldapadmin/assets/apache2/certs
19+
PHPLDAPADMIN_HTTPS: true
20+
PHPLDAPADMIN_HTTPS_CRT_FILENAME: phpldapadmin.crt
21+
PHPLDAPADMIN_HTTPS_KEY_FILENAME: phpldapadmin.key
22+
PHPLDAPADMIN_HTTPS_CA_CRT_FILENAME: ca.crt
2323

24-
# LDAP certificate
25-
USE_LDAP_CLIENT_SSL: true
26-
27-
LDAP_REQCERT: demand
28-
LDAP_CA_CRT_FILENAME: ldap-ca.crt
29-
30-
# client certificate
31-
LDAP_CRT_FILENAME: ldap-client.crt
32-
LDAP_KEY_FILENAME: ldap-client.key
24+
# LDAP client tls config
25+
PHPLDAPADMIN_LDAP_CLIENT_TLS: true
26+
PHPLDAPADMIN_LDAP_CLIENT_TLS_REQCERT: demand
27+
PHPLDAPADMIN_LDAP_CLIENT_TLS_CA_CRT_FILENAME: ldap-ca.crt
28+
PHPLDAPADMIN_LDAP_CLIENT_TLS_CRT_FILENAME: ldap-client.crt
29+
PHPLDAPADMIN_LDAP_CLIENT_TLS_KEY_FILENAME: ldap-client.key
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Add your https server certificate, key and the CA certificate (if any) here
2+
or during docker run mount a data volume with thoses files to /container/service/phpldapadmin/assets/apache2/certs

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<VirtualHost _default_:443>
88

99
ServerName ${HOSTNAME}
10-
ServerAdmin ${SERVER_ADMIN}
10+
ServerAdmin ${PHPLDAPADMIN_SERVER_ADMIN}
1111
ServerPath /phpldapadmin
1212

1313
DocumentRoot /var/www/phpldapadmin/htdocs
@@ -17,9 +17,9 @@
1717

1818
Include /etc/apache2/conf-available/vhost-partial-ssl.conf
1919

20-
SSLCertificateFile /container/service/phpldapadmin/assets/apache2/ssl/${SSL_CRT_FILENAME}
21-
SSLCertificateKeyFile /container/service/phpldapadmin/assets/apache2/ssl/${SSL_KEY_FILENAME}
22-
#SSLCACertificateFile /container/service/phpldapadmin/assets/apache2/ssl/${SSL_CA_CRT_FILENAME}
20+
SSLCertificateFile /container/service/phpldapadmin/assets/apache2/certs/${PHPLDAPADMIN_HTTPS_CRT_FILENAME}
21+
SSLCertificateKeyFile /container/service/phpldapadmin/assets/apache2/certs/${PHPLDAPADMIN_HTTPS_KEY_FILENAME}
22+
#SSLCACertificateFile /container/service/phpldapadmin/assets/apache2/certs/${PHPLDAPADMIN_HTTPS_CA_CRT_FILENAME}
2323

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<VirtualHost *:80>
22

33
ServerName ${HOSTNAME}
4-
ServerAdmin ${SERVER_ADMIN}
4+
ServerAdmin ${PHPLDAPADMIN_SERVER_ADMIN}
55
ServerPath /phpldapadmin
66

77
DocumentRoot /var/www/phpldapadmin/htdocs

image/service/phpldapadmin/assets/apache2/ssl/README.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

image/service/phpldapadmin/assets/config.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
/*
2929
* Autogenerated value will be automatically added by phpldapadmin/container-start.sh
3030
*/
31-
$config->custom->session['blowfish'] = '';
31+
$config->custom->session['blowfish'] = '{{ PHPMYADMIN_CONFIG_BLOWFISH }}';
3232

3333

3434
/*********************************************
@@ -39,8 +39,6 @@
3939

4040

4141

42-
43-
4442
/*********************************************
4543
* User-friendly attribute translation *
4644
*********************************************/

0 commit comments

Comments
 (0)