Skip to content

Commit bde7473

Browse files
committed
web-baseimage:0.1.8
1 parent 113652a commit bde7473

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ Ldap client TLS/LDAPS :
183183

184184
Other environment variables:
185185
- **PHPLDAPADMIN_CFSSL_PREFIX**: cfssl environment variables prefix. Defaults to `phpldapadmin`, cfssl-helper first search config from PHPLDAPADMIN_CFSSL_* variables, before CFSSL_* variables.
186-
- **PHPLDAPADMIN_LDAP_CLIENT_CFSSL_PREFIX**: cfssl environment variables prefix. Defaults to `ldap`, cfssl-helper first search config from LDAP_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.
187187

188188
### Set your own environment variables
189189

image/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ENV PHPLDAPADMIN_SHA1 669fca66c75e24137e106fdd02e3832f81146e23
1010
# https://github.com/osixia/docker-light-baseimage/blob/stable/image/tool/add-service-available
1111
#  https://github.com/osixia/docker-web-baseimage/blob/stable/image/service-available/:apache2/download.sh
1212
# https://github.com/osixia/docker-web-baseimage/blob/stable/image/service-available/:php5-fpm/download.sh
13+
# https://github.com/osixia/docker-web-baseimage/blob/stable/image/service-available/:cfssl/download.sh
1314
# Install ca-certificates, curl and php dependencies
1415
# Download phpLDAPadmin, check file integrity, and unzip phpLDAPadmin to /var/www/phpldapadmin_bootstrap
1516
# Remove curl

image/environment/default.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ PHPLDAPADMIN_SERVER_ADMIN: webmaster@example.org
1515

1616
# To use your custom certificat and key 2 options :
1717
# - 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
18+
# - or during docker run mount a data volume with those files to /container/service/phpldapadmin/assets/apache2/certs
1919
PHPLDAPADMIN_HTTPS: true
2020
PHPLDAPADMIN_HTTPS_CRT_FILENAME: phpldapadmin.crt
2121
PHPLDAPADMIN_HTTPS_KEY_FILENAME: phpldapadmin.key
@@ -30,4 +30,4 @@ PHPLDAPADMIN_LDAP_CLIENT_TLS_KEY_FILENAME: ldap-client.key
3030

3131
# cfssl environment variables prefix
3232
PHPLDAPADMIN_CFSSL_PREFIX: phpldapadmin # cfssl-helper first search config from PHPLDAPADMIN_CFSSL_* variables, before CFSSL_* variables.
33-
PHPLDAPADMIN_LDAP_CLIENT_CFSSL_PREFIX: ldap # cfssl-helper first search config from LDAP_CFSSL_* variables, before CFSSL_* variables.
33+
LDAP_CLIENT_CFSSL_PREFIX: ldap # cfssl-helper first search config from LDAP_CFSSL_* variables, before CFSSL_* variables.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Add your ldap client certificate, key and CA certificate here
2-
or during docker run mount a data volume with thoses files to /container/service/ldap-client/assets/certs
2+
or during docker run mount a data volume with those files to /container/service/ldap-client/assets/certs

image/service/ldap-client/startup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if [ ! -e "$FIRST_START_DONE" ]; then
1414

1515
# generate a certificate and key if files don't exists
1616
# https://github.com/osixia/docker-light-baseimage/blob/stable/image/service-available/:cfssl/assets/tool/cfssl-helper
17-
cfssl-helper ${PHPLDAPADMIN_LDAP_CLIENT_CFSSL_PREFIX} "${CONTAINER_SERVICE_DIR}/ldap-client/assets/certs/${PHPLDAPADMIN_LDAP_CLIENT_TLS_CRT_FILENAME}" "${CONTAINER_SERVICE_DIR}/ldap-client/assets/certs/${PHPLDAPADMIN_LDAP_CLIENT_TLS_KEY_FILENAME}" "${CONTAINER_SERVICE_DIR}/ldap-client/assets/certs/${PHPLDAPADMIN_LDAP_CLIENT_TLS_CA_CRT_FILENAME}"
17+
cfssl-helper ${LDAP_CLIENT_CFSSL_PREFIX} "${CONTAINER_SERVICE_DIR}/ldap-client/assets/certs/${PHPLDAPADMIN_LDAP_CLIENT_TLS_CRT_FILENAME}" "${CONTAINER_SERVICE_DIR}/ldap-client/assets/certs/${PHPLDAPADMIN_LDAP_CLIENT_TLS_KEY_FILENAME}" "${CONTAINER_SERVICE_DIR}/ldap-client/assets/certs/${PHPLDAPADMIN_LDAP_CLIENT_TLS_CA_CRT_FILENAME}"
1818

1919
# ldap client config
2020
sed -i --follow-symlinks "s,TLS_CACERT.*,TLS_CACERT ${CONTAINER_SERVICE_DIR}/ldap-client/assets/certs/${PHPLDAPADMIN_LDAP_CLIENT_TLS_CA_CRT_FILENAME},g" /etc/ldap/ldap.conf

image/service/phpldapadmin/startup.sh

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ fi
3131

3232
a2ensite phpldapadmin | log-helper debug
3333

34-
3534
FIRST_START_DONE="${CONTAINER_STATE_DIR}/docker-phpldapadmin-first-start-done"
3635
# container first start
3736
if [ ! -e "$FIRST_START_DONE" ]; then
@@ -87,34 +86,34 @@ if [ ! -e "$FIRST_START_DONE" ]; then
8786
do
8887
if [ $(complex-bash-env isRow "${!info}") = true ]; then
8988
local key=$(complex-bash-env getRowKey "${!info}")
90-
local value=$(complex-bash-env getRowValue "${!info}")
89+
local valueVarName=$(complex-bash-env getRowValueVarName "${!info}")
9190

92-
if [ $(complex-bash-env isTable "$value") = true ] || [ $(complex-bash-env isRow "$value") = true ]; then
93-
host_info "$to_print'$key'," "${value}"
91+
if [ $(complex-bash-env isTable "${!valueVarName}") = true ] || [ $(complex-bash-env isRow "${!valueVarName}") = true ]; then
92+
host_info "$to_print'$key'," "${valueVarName}"
9493
else
95-
append_value_to_file "$to_print'$key'," "$value"
94+
append_value_to_file "$to_print'$key'," "${!valueVarName}"
9695
fi
9796
fi
9897
done
9998
}
10099

101100
# phpLDAPadmin config
102-
for host in $(complex-bash-env iterate "${PHPLDAPADMIN_LDAP_HOSTS}")
101+
for host in $(complex-bash-env iterate PHPLDAPADMIN_LDAP_HOSTS)
103102
do
104103

105104
append_to_file "\$servers->newServer('ldap_pla');"
106105

107106
if [ $(complex-bash-env isRow "${!host}") = true ]; then
108107
hostname=$(complex-bash-env getRowKey "${!host}")
109-
info=$(complex-bash-env getRowValue "${!host}")
108+
info=$(complex-bash-env getRowValueVarName "${!host}")
110109

111110
append_to_file "\$servers->setValue('server','name','$hostname');"
112111
append_to_file "\$servers->setValue('server','host','$hostname');"
113112
host_info "" "$info"
114113

115114
else
116-
append_to_file "\$servers->setValue('server','name','${host}');"
117-
append_to_file "\$servers->setValue('server','host','${host}');"
115+
append_to_file "\$servers->setValue('server','name','${!host}');"
116+
append_to_file "\$servers->setValue('server','host','${!host}');"
118117
fi
119118
done
120119

0 commit comments

Comments
 (0)