You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://imagelayers.io/?images=osixia/phpldapadmin:latest'Get your own badge on imagelayers.io')
3
+
[](https://imagelayers.io/?images=osixia/phpldapadmin:latest'Get your own badge on imagelayers.io') | Latest release: 0.6.7 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/phpldapadmin/)
This image comes with a phpLDAPadmin config.php file that can be easily customized via environment variables for a quick bootstrap,
65
+
but setting your own config.php is possible. 2 options:
66
+
67
+
- Link your config file at run time to `/container/service/phpldapadmin/assets/config.php` :
68
+
69
+
docker run --volume /data/my-config.php:/container/service/phpldapadmin/assets/config.php --detach osixia/phpldapadmin:0.6.7
70
+
71
+
- Add your config file by extending or cloning this image, please refer to the [Advanced User Guide](#advanced-user-guide)
72
+
41
73
### HTTPS
42
74
43
75
#### Use autogenerated certificate
44
-
By default HTTPS is enable, a certificate is created with the container hostname (set by -h option eg: phpldapadmin.my-compagny.com).
76
+
By default HTTPS is enable, a certificate is created with the container hostname (it can be set by docker run --hostname option eg: phpldapadmin.my-company.com).
45
77
46
-
docker run -h phpldapadmin.my-compagny.com -d osixia/phpldapadmin
78
+
docker run --hostname phpldapadmin.my-company.com --detach osixia/phpldapadmin:0.6.7
47
79
48
80
#### Use your own certificate
49
81
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)).
51
-
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 :
82
+
You can set your custom certificate at run time, by mounting a directory containing those files to **/container/service/phpldapadmin/assets/apache2/certs** and adjust their name with the following environment variables:
53
83
54
-
docker run -v /path/to/certifates:/container/service/phpldapadmin/assets/apache2/certs \
Ommit the -e PHPLDAPADMIN_HTTPS_CA_CRT_FILENAME variable for self signed certificates
90
+
Other solutions are available please refer to the [Advanced User Guide](#advanced-user-guide)
61
91
62
92
#### Disable HTTPS
63
-
Add -e PHPLDAPADMIN_HTTPS=false to the run command :
93
+
Add --env PHPLDAPADMIN_HTTPS=false to the run command :
64
94
65
-
docker run -e PHPLDAPADMIN_HTTPS=false -d osixia/phpldapadmin
95
+
docker run --env PHPLDAPADMIN_HTTPS=false --detach osixia/phpldapadmin:0.6.7
66
96
67
-
##Environment Variables
97
+
### Debug
68
98
69
-
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 `/container/environment/env.yaml`. See examples below.
99
+
The container default log level is **info**.
100
+
Available levels are: `none`, `error`, `warning`, `info`, `debug` and `trace`.
70
101
71
-
-**PHPLDAPADMIN_LDAP_HOSTS**: Set phpLDAPadmin server config. Defaults to :
102
+
Example command to run the container in `debug` mode:
72
103
73
-
- ldap.example.org:
74
-
- server:
75
-
- tls: true
76
-
- login:
77
-
- bind_id: cn=admin,dc=example,dc=org
78
-
- ldap2.example.org
79
-
- ldap3.example.org
104
+
docker run --detach osixia/phpldapadmin:0.6.7 --loglevel debug
80
105
81
-
This will be converted in the phpldapadmin config.php file to :
To convert yaml to python online: http://yaml-online-parser.appspot.com/
101
164
102
165
Apache :
103
166
- **PHPLDAPADMIN_SERVER_ADMIN**: Server admin email. Defaults to `webmaster@example.org`
@@ -118,19 +181,49 @@ Ldap client TLS/LDAPS :
118
181
119
182
More information at : http://www.openldap.org/doc/admin24/tls.html (16.2.2. Client Configuration)
120
183
121
-
### Set environment variables at run time :
184
+
Other environment variables:
185
+
- **PHPLDAPADMIN_CFSSL_PREFIX**: cfssl environment variables prefix. Defaults to `phpldapadmin`, cfssl-helper first search config from PHPLDAPADMIN_CFSSL_* variables, before CFSSL_* variables.
186
+
- **LDAP_CLIENT_CFSSL_PREFIX**: cfssl environment variables prefix. Defaults to `ldap`, cfssl-helper first search config from LDAP_CFSSL_* variables, before CFSSL_* variables.
187
+
188
+
### Set your own environment variables
189
+
190
+
#### Use command line argument
191
+
Environment variables can be set by adding the --env argument in the command line, for example:
192
+
193
+
docker run --env PHPLDAPADMIN_LDAP_HOSTS="ldap.example.org" \
194
+
--detach osixia/phpldapadmin:0.6.7
122
195
123
-
Environment variable can be set directly by adding the -e argument in the command line, for example :
196
+
#### Link environment file
124
197
125
-
docker run -h phpldapadmin.example.org -e PHPLDAPADMIN_LDAP_HOSTS="ldap.example.org" \
126
-
-d osixia/phpldapadmin
198
+
For example if your environment file is in : /data/environment/my-env.yaml
127
199
128
-
Or by setting your own `env.yaml` file as a docker volume to `/container/environment/env.yaml`
200
+
docker run --volume /data/environment/my-env.yaml:/container/environment/01-custom/env.yaml \
201
+
--detach osixia/phpldapadmin:0.6.7
129
202
130
-
docker run -h ldap.example.org -v /data/my-env.yaml:/container/environment/env.yaml \
131
-
-d osixia/openldap
203
+
Take care to link your environment file to `/container/environment/XX-somedir` (with XX < 99 so they will be processed before default environment files) and not directly to `/container/environment` because this directory contains predefined baseimage environment files to fix container environment (INITRD, LANG, LANGUAGE and LC_CTYPE).
132
204
133
-
## Manual build
205
+
#### Make your own image or extend this image
206
+
207
+
This is the best solution if you have a private registry. Please refer to the [Advanced User Guide](#advanced-user-guide) just below.
208
+
209
+
## Advanced User Guide
210
+
211
+
### Extend osixia/phpldapadmin:0.6.7 image
212
+
213
+
If you need to add your custom TLS certificate, bootstrap config or environment files the easiest way is to extends this image.
Adapt Makefile, set your image NAME and VERSION, for example :
141
234
142
235
NAME = osixia/phpldapadmin
143
-
VERSION = 0.6.4
236
+
VERSION = 0.6.7
144
237
145
238
becomes :
146
239
NAME = billy-the-king/phpldapadmin
147
240
VERSION = 0.1.0
148
241
242
+
Add your custom certificate, environment files, config.php ...
243
+
149
244
Build your image :
150
245
151
246
make build
@@ -154,7 +249,7 @@ Run your image :
154
249
155
250
docker run -d billy-the-king/phpldapadmin:0.1.0
156
251
157
-
## Tests
252
+
### Tests
158
253
159
254
We use **Bats** (Bash Automated Testing System) to test this image:
160
255
@@ -163,3 +258,22 @@ We use **Bats** (Bash Automated Testing System) to test this image:
163
258
Install Bats, and in this project directory run :
164
259
165
260
make test
261
+
262
+
### Kubernetes
263
+
264
+
Kubernetes is an open source system for managing containerized applications across multiple hosts, providing basic mechanisms for deployment, maintenance, and scaling of applications.
265
+
266
+
More information:
267
+
- http://kubernetes.io
268
+
- https://github.com/kubernetes/kubernetes
269
+
270
+
A kubernetes example is available in **example/kubernetes**
271
+
272
+
### Under the hood: osixia/web-baseimage
273
+
274
+
This image is based on osixia/web-baseimage.
275
+
More info: https://github.com/osixia/docker-web-baseimage
0 commit comments