From ec68c5d814469a9406bda73507fdd4ac52e44580 Mon Sep 17 00:00:00 2001 From: Bertrand Gouny Date: Wed, 5 Jul 2017 11:33:08 +0200 Subject: [PATCH 1/5] [twgit] Init release 'release-0.7.0'. From 898f673fda0b618149842b1ab4026d66c756279e Mon Sep 17 00:00:00 2001 From: Bertrand Gouny Date: Thu, 6 Jul 2017 17:02:31 +0200 Subject: [PATCH 2/5] debian stretch + php7 --- CHANGELOG.md | 3 ++ Makefile | 23 +++++++----- README.md | 36 +++++++++---------- example/kubernetes/phpldapadmin-rc.yaml | 2 +- image/Dockerfile | 19 +++++----- image/environment/default.startup.yaml | 2 +- .../phpldapadmin/assets/php5-fpm/pool.conf | 4 --- .../phpldapadmin/assets/php7.0-fpm/pool.conf | 1 + image/service/phpldapadmin/install.sh | 7 ++-- test/test.bats | 6 ++-- 10 files changed, 53 insertions(+), 50 deletions(-) delete mode 100644 image/service/phpldapadmin/assets/php5-fpm/pool.conf create mode 100644 image/service/phpldapadmin/assets/php7.0-fpm/pool.conf diff --git a/CHANGELOG.md b/CHANGELOG.md index 2615f22..84e77f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 0.7.0 + - Upgrade baseimage: web-baseimage:1.1.0 (debian stretch, php7) + ## 0.6.12 - Fixes Parse error: syntax error, unexpected '}' in /container/service/phpldapadmin/assets/config.php on line 68 #23 - Upgrade baseimage: web-baseimage:1.0.0 diff --git a/Makefile b/Makefile index 1b037ff..bcc7730 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,7 @@ NAME = osixia/phpldapadmin -VERSION = 0.6.12 +VERSION = 0.7.0 -.PHONY: all build build-nocache test tag_latest release - -all: build +.PHONY: build build-nocache test tag-latest push push-latest release git-tag-version build: docker build -t $(NAME):$(VERSION) --rm image @@ -14,10 +12,17 @@ build-nocache: test: env NAME=$(NAME) VERSION=$(VERSION) bats test/test.bats -tag_latest: +tag-latest: docker tag $(NAME):$(VERSION) $(NAME):latest -release: build test tag_latest - @if ! docker images $(NAME) | awk '{ print $$2 }' | grep -q -F $(VERSION); then echo "$(NAME) version $(VERSION) is not yet built. Please run 'make build'"; false; fi - docker push $(NAME) - @echo "*** Don't forget to run 'twgit release/hotfix finish' :)" +push: + docker push $(NAME):$(VERSION) + +push-latest: + docker push $(NAME):latest + +release: build test tag_latest push push_latest + +git-tag-version: release + git tag -a v$(VERSION) -m "v$(VERSION)" + git push origin v$(VERSION) diff --git a/README.md b/README.md index a777cc2..01890b7 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [hub]: https://hub.docker.com/r/osixia/phpldapadmin/ -Latest release: 0.6.12 - phpLDAPadmin 1.2.3 (with php5.5 patch) - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/phpldapadmin/)  +Latest release: 0.7.0 - phpLDAPadmin 1.2.3 (with php7 patch) - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/phpldapadmin/)  **A docker image to run phpLDAPadmin.** > [phpldapadmin.sourceforge.net](http://phpldapadmin.sourceforge.net) @@ -26,7 +26,7 @@ Latest release: 0.6.12 - phpLDAPadmin 1.2.3 (with php5.5 patch) - [Changelog](CH - [Link environment file](#link-environment-file) - [Make your own image or extend this image](#make-your-own-image-or-extend-this-image) - [Advanced User Guide](#advanced-user-guide) - - [Extend osixia/phpldapadmin:0.6.12 image](#extend-osixiaphpldapadmin0612-image) + - [Extend osixia/phpldapadmin:0.7.0 image](#extend-osixiaphpldapadmin070-image) - [Make your own phpLDAPadmin image](#make-your-own-phpldapadmin-image) - [Tests](#tests) - [Kubernetes](#kubernetes) @@ -39,7 +39,7 @@ Run a phpLDAPadmin docker image by replacing `ldap.example.com` with your ldap h docker run -p 6443:443 \ --env PHPLDAPADMIN_LDAP_HOSTS=ldap.example.com \ - --detach osixia/phpldapadmin:0.6.12 + --detach osixia/phpldapadmin:0.7.0 That's it :) you can access phpLDAPadmin on [https://localhost:6443](https://localhost:6443) @@ -49,7 +49,7 @@ Example script: #!/bin/bash -e docker run --name ldap-service --hostname ldap-service --detach osixia/openldap:1.1.8 - docker run --name phpldapadmin-service --hostname phpldapadmin-service --link ldap-service:ldap-host --env PHPLDAPADMIN_LDAP_HOSTS=ldap-host --detach osixia/phpldapadmin:0.6.12 + docker run --name phpldapadmin-service --hostname phpldapadmin-service --link ldap-service:ldap-host --env PHPLDAPADMIN_LDAP_HOSTS=ldap-host --detach osixia/phpldapadmin:0.7.0 PHPLDAP_IP=$(docker inspect -f "{{ .NetworkSettings.IPAddress }}" phpldapadmin-service) @@ -66,7 +66,7 @@ but setting your own config.php is possible. 2 options: - Link your config file at run time to `/container/service/phpldapadmin/assets/config.php` : - docker run --volume /data/my-config.php:/container/service/phpldapadmin/assets/config.php --detach osixia/phpldapadmin:0.6.12 + docker run --volume /data/my-config.php:/container/service/phpldapadmin/assets/config.php --detach osixia/phpldapadmin:0.7.0 - Add your config file by extending or cloning this image, please refer to the [Advanced User Guide](#advanced-user-guide) @@ -75,7 +75,7 @@ but setting your own config.php is possible. 2 options: #### Use autogenerated certificate 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). - docker run --hostname phpldapadmin.my-company.com --detach osixia/phpldapadmin:0.6.12 + docker run --hostname phpldapadmin.my-company.com --detach osixia/phpldapadmin:0.7.0 #### Use your own certificate @@ -85,14 +85,14 @@ You can set your custom certificate at run time, by mounting a directory contain --env PHPLDAPADMIN_HTTPS_CRT_FILENAME=my-cert.crt \ --env PHPLDAPADMIN_HTTPS_KEY_FILENAME=my-cert.key \ --env PHPLDAPADMIN_HTTPS_CA_CRT_FILENAME=the-ca.crt \ - --detach osixia/phpldapadmin:0.6.12 + --detach osixia/phpldapadmin:0.7.0 Other solutions are available please refer to the [Advanced User Guide](#advanced-user-guide) #### Disable HTTPS Add --env PHPLDAPADMIN_HTTPS=false to the run command : - docker run --env PHPLDAPADMIN_HTTPS=false --detach osixia/phpldapadmin:0.6.12 + docker run --env PHPLDAPADMIN_HTTPS=false --detach osixia/phpldapadmin:0.7.0 ### Fix docker mounted file problems @@ -100,7 +100,7 @@ You may have some problems with mounted files on some systems. The startup scrip To fix that run the container with `--copy-service` argument : - docker run [your options] osixia/phpldapadmin:0.6.12 --copy-service + docker run [your options] osixia/phpldapadmin:0.7.0 --copy-service ### Debug @@ -109,11 +109,11 @@ Available levels are: `none`, `error`, `warning`, `info`, `debug` and `trace`. Example command to run the container in `debug` mode: - docker run --detach osixia/phpldapadmin:0.6.12 --loglevel debug + docker run --detach osixia/phpldapadmin:0.7.0 --loglevel debug See all command line options: - docker run osixia/phpldapadmin:0.6.12 --help + docker run osixia/phpldapadmin:0.7.0 --help ## Environment Variables @@ -133,7 +133,7 @@ See how to [set your own environment variables](#set-your-own-environment-variab - ldap3.example.org ``` This will be converted in the phpldapadmin config.php file to : - ```php5 + ```php7 $servers->newServer('ldap_pla'); $servers->setValue('server','name','ldap.example.org'); $servers->setValue('server','host','ldap.example.org'); @@ -166,7 +166,7 @@ See how to [set your own environment variables](#set-your-own-environment-variab If you want to set this variable at docker run command add the tag `#PYTHON2BASH:` and convert the yaml in python: - docker run --env PHPLDAPADMIN_LDAP_HOSTS="#PYTHON2BASH:[{'ldap.example.org': [{'server': [{'tls': True}]},{'login': [{'bind_id': 'cn=admin,dc=example,dc=org'}]}]}, 'ldap2.example.org', 'ldap3.example.org']" --detach osixia/phpldapadmin:0.6.12 + docker run --env PHPLDAPADMIN_LDAP_HOSTS="#PYTHON2BASH:[{'ldap.example.org': [{'server': [{'tls': True}]},{'login': [{'bind_id': 'cn=admin,dc=example,dc=org'}]}]}, 'ldap2.example.org', 'ldap3.example.org']" --detach osixia/phpldapadmin:0.7.0 To convert yaml to python online: http://yaml-online-parser.appspot.com/ @@ -203,14 +203,14 @@ Other environment variables: Environment variables can be set by adding the --env argument in the command line, for example: docker run --env PHPLDAPADMIN_LDAP_HOSTS="ldap.example.org" \ - --detach osixia/phpldapadmin:0.6.12 + --detach osixia/phpldapadmin:0.7.0 #### Link environment file For example if your environment file is in : /data/environment/my-env.yaml docker run --volume /data/environment/my-env.yaml:/container/environment/01-custom/env.yaml \ - --detach osixia/phpldapadmin:0.6.12 + --detach osixia/phpldapadmin:0.7.0 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). @@ -220,13 +220,13 @@ This is the best solution if you have a private registry. Please refer to the [A ## Advanced User Guide -### Extend osixia/phpldapadmin:0.6.12 image +### Extend osixia/phpldapadmin:0.7.0 image If you need to add your custom TLS certificate, bootstrap config or environment files the easiest way is to extends this image. Dockerfile example: - FROM osixia/phpldapadmin:0.6.12 + FROM osixia/phpldapadmin:0.7.0 MAINTAINER Your Name ADD https-certs /container/service/phpldapadmin/assets/apache2/certs @@ -248,7 +248,7 @@ Clone this project : Adapt Makefile, set your image NAME and VERSION, for example : NAME = osixia/phpldapadmin - VERSION = 0.6.12 + VERSION = 0.7.0 becomes : NAME = billy-the-king/phpldapadmin diff --git a/example/kubernetes/phpldapadmin-rc.yaml b/example/kubernetes/phpldapadmin-rc.yaml index 29209da..b9cb372 100644 --- a/example/kubernetes/phpldapadmin-rc.yaml +++ b/example/kubernetes/phpldapadmin-rc.yaml @@ -15,7 +15,7 @@ spec: spec: containers: - name: phpldapadmin - image: osixia/phpldapadmin:0.6.12 + image: osixia/phpldapadmin:0.7.0 volumeMounts: - name: phpldapadmin-certs mountPath: /container/service/phpldapadmin/assets/apache2/certs diff --git a/image/Dockerfile b/image/Dockerfile index 0ce6bc8..6096088 100644 --- a/image/Dockerfile +++ b/image/Dockerfile @@ -1,28 +1,29 @@ -FROM osixia/web-baseimage:1.0.0 +FROM osixia/web-baseimage:1.1.0 MAINTAINER Bertrand Gouny # phpLDAPadmin version -ENV PHPLDAPADMIN_VERSION 1.2.3 -ENV PHPLDAPADMIN_SHA1 669fca66c75e24137e106fdd02e3832f81146e23 +ARG PHPLDAPADMIN_VERSION=1.2.3 +ARG PHPLDAPADMIN_SHA1=669fca66c75e24137e106fdd02e3832f81146e23 -# Add multiple process stack to supervise apache2 and php5-fpm +# Add multiple process stack to supervise apache2 and php7.0-fpm # sources: https://github.com/osixia/docker-light-baseimage/blob/stable/image/tool/add-multiple-process-stack # https://github.com/osixia/docker-light-baseimage/blob/stable/image/tool/add-service-available #  https://github.com/osixia/docker-web-baseimage/blob/stable/image/service-available/:apache2/download.sh -# https://github.com/osixia/docker-web-baseimage/blob/stable/image/service-available/:php5-fpm/download.sh +# https://github.com/osixia/docker-web-baseimage/blob/stable/image/service-available/:php7.0-fpm/download.sh # https://github.com/osixia/light-baseimage/blob/stable/image/service-available/:ssl-tools/download.sh # Install ca-certificates, curl and php dependencies # Download phpLDAPadmin, check file integrity, and unzip phpLDAPadmin to /var/www/phpldapadmin_bootstrap # Remove curl RUN apt-get update \ && /container/tool/add-multiple-process-stack \ - && /container/tool/add-service-available :apache2 :php5-fpm :ssl-tools \ - && LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes --no-install-recommends \ + && /container/tool/add-service-available :apache2 :php7.0-fpm :ssl-tools \ + && LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ ca-certificates \ curl \ patch \ - php5-ldap \ - php5-readline \ + php7.0-ldap \ + php7.0-readline \ + php7.0-xml \ && curl -o phpldapadmin.tgz -SL https://downloads.sourceforge.net/project/phpldapadmin/phpldapadmin-php5/${PHPLDAPADMIN_VERSION}/phpldapadmin-${PHPLDAPADMIN_VERSION}.tgz \ && echo "$PHPLDAPADMIN_SHA1 *phpldapadmin.tgz" | sha1sum -c - \ && mkdir -p /var/www/phpldapadmin_bootstrap /var/www/phpldapadmin \ diff --git a/image/environment/default.startup.yaml b/image/environment/default.startup.yaml index 90c2ca5..ac5e1a5 100644 --- a/image/environment/default.startup.yaml +++ b/image/environment/default.startup.yaml @@ -17,4 +17,4 @@ PHPLDAPADMIN_LDAP_CLIENT_TLS_KEY_FILENAME: ldap-client.key # ssl-helper environment variables prefix LDAP_CLIENT_SSL_HELPER_PREFIX: ldap # ssl-helper first search config from LDAP_SSL_HELPER_* variables, before SSL_HELPER_* variables. -SSL_HELPER_AUTO_RENEW_SERVICES_IMPACTED: :apache2 :php5-fpm +SSL_HELPER_AUTO_RENEW_SERVICES_IMPACTED: :apache2 :php7.0-fpm diff --git a/image/service/phpldapadmin/assets/php5-fpm/pool.conf b/image/service/phpldapadmin/assets/php5-fpm/pool.conf deleted file mode 100644 index 108aa53..0000000 --- a/image/service/phpldapadmin/assets/php5-fpm/pool.conf +++ /dev/null @@ -1,4 +0,0 @@ -php_flag[magic_quotes_gpc]=Off -php_flag[track_vars]=On -php_flag[register_globals]=Off -php_value[include_path]=. \ No newline at end of file diff --git a/image/service/phpldapadmin/assets/php7.0-fpm/pool.conf b/image/service/phpldapadmin/assets/php7.0-fpm/pool.conf new file mode 100644 index 0000000..b23d0e5 --- /dev/null +++ b/image/service/phpldapadmin/assets/php7.0-fpm/pool.conf @@ -0,0 +1 @@ +php_value[include_path] = . diff --git a/image/service/phpldapadmin/install.sh b/image/service/phpldapadmin/install.sh index d0e772d..492dcaa 100755 --- a/image/service/phpldapadmin/install.sh +++ b/image/service/phpldapadmin/install.sh @@ -1,8 +1,8 @@ #!/bin/bash -e # this script is run during the image build -cat /container/service/phpldapadmin/assets/php5-fpm/pool.conf >> /etc/php5/fpm/pool.d/www.conf -rm /container/service/phpldapadmin/assets/php5-fpm/pool.conf +cat /container/service/phpldapadmin/assets/php7.0-fpm/pool.conf >> /etc/php/7.0/fpm/pool.d/www.conf +rm /container/service/phpldapadmin/assets/php7.0-fpm/pool.conf mkdir -p /var/www/tmp chown www-data:www-data /var/www/tmp @@ -17,6 +17,3 @@ rm -rf /var/www/phpldapadmin_bootstrap/doc # apply php5.5 patch patch -p1 -d /var/www/phpldapadmin_bootstrap < /container/service/phpldapadmin/assets/php5.5.patch sed -i "s/password_hash/password_hash_custom/g" /var/www/phpldapadmin_bootstrap/lib/TemplateRender.php - -# fix php5-fpm $_SERVER['SCRIPT_NAME'] bad value with cgi.fix_pathinfo=0 -sed -i "s/'SCRIPT_NAME'/'PATH_INFO'/g" /var/www/phpldapadmin_bootstrap/lib/common.php diff --git a/test/test.bats b/test/test.bats index bbfb307..c830b85 100644 --- a/test/test.bats +++ b/test/test.bats @@ -13,7 +13,7 @@ load test_helper tmp_file="$BATS_TMPDIR/docker-test" run_image - wait_process apache2 php5-fpm + wait_process apache2 php-fpm7.0 curl --silent --insecure https://$CONTAINER_IP >> $tmp_file run grep -c "Use the menu to the left to navigate" $tmp_file rm $tmp_file @@ -29,7 +29,7 @@ load test_helper tmp_file="$BATS_TMPDIR/docker-test" # we start a new openldap container - LDAP_CID=$(docker run -d osixia/openldap:1.1.6) + LDAP_CID=$(docker run -d osixia/openldap:1.1.9) LDAP_IP=$(get_container_ip_by_cid $LDAP_CID) # we start the wordpress container and set DB_HOSTS @@ -39,7 +39,7 @@ load test_helper wait_process_by_cid $LDAP_CID slapd # wait phpLDAPadmin container apache2 service - wait_process apache2 php5-fpm + wait_process apache2 php-fpm7.0 curl -L --silent --insecure -c $BATS_TMPDIR/cookie.txt https://$CONTAINER_IP >> $tmp_file From 419a6a3567c7fbb4d5fa4ad0a5896a123d93c5ff Mon Sep 17 00:00:00 2001 From: Bertrand Gouny Date: Fri, 7 Jul 2017 11:52:26 +0200 Subject: [PATCH 3/5] foward logs to docker --- image/service/phpldapadmin/assets/apache2/http.conf | 3 --- image/service/phpldapadmin/assets/apache2/https.conf | 3 --- 2 files changed, 6 deletions(-) diff --git a/image/service/phpldapadmin/assets/apache2/http.conf b/image/service/phpldapadmin/assets/apache2/http.conf index 74bcfe2..3ef84db 100644 --- a/image/service/phpldapadmin/assets/apache2/http.conf +++ b/image/service/phpldapadmin/assets/apache2/http.conf @@ -6,9 +6,6 @@ DocumentRoot /var/www/phpldapadmin/htdocs - ErrorLog ${APACHE_LOG_DIR}/error.log - CustomLog ${APACHE_LOG_DIR}/access.log combined - Require all granted diff --git a/image/service/phpldapadmin/assets/apache2/https.conf b/image/service/phpldapadmin/assets/apache2/https.conf index fd74948..88457ad 100644 --- a/image/service/phpldapadmin/assets/apache2/https.conf +++ b/image/service/phpldapadmin/assets/apache2/https.conf @@ -6,9 +6,6 @@ DocumentRoot /var/www/phpldapadmin/htdocs - ErrorLog ${APACHE_LOG_DIR}/error.log - CustomLog ${APACHE_LOG_DIR}/access.log combined - Include /etc/apache2/conf-available/vhost-partial-ssl.conf SSLCertificateFile ${CONTAINER_SERVICE_DIR}/phpldapadmin/assets/apache2/certs/${PHPLDAPADMIN_HTTPS_CRT_FILENAME} From 1317579d17357ac60294458ed88a710345d3c2c2 Mon Sep 17 00:00:00 2001 From: Bertrand Gouny Date: Wed, 19 Jul 2017 17:52:44 +0200 Subject: [PATCH 4/5] move php config file to config dir --- CHANGELOG.md | 3 ++- README.md | 6 +++--- .../service/phpldapadmin/assets/{ => config}/README.md | 2 +- .../phpldapadmin/assets/{ => config}/config.php | 0 image/service/phpldapadmin/startup.sh | 10 +++++----- 5 files changed, 11 insertions(+), 10 deletions(-) rename image/service/phpldapadmin/assets/{ => config}/README.md (51%) rename image/service/phpldapadmin/assets/{ => config}/config.php (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84e77f4..b445f3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,11 @@ # Changelog ## 0.7.0 + - add config.php in config folder - Upgrade baseimage: web-baseimage:1.1.0 (debian stretch, php7) ## 0.6.12 - - Fixes Parse error: syntax error, unexpected '}' in /container/service/phpldapadmin/assets/config.php on line 68 #23 + - Fixes Parse error: syntax error, unexpected '}' in config.php on line 68 #23 - Upgrade baseimage: web-baseimage:1.0.0 ## 0.6.11 diff --git a/README.md b/README.md index 01890b7..c3b9b66 100644 --- a/README.md +++ b/README.md @@ -64,9 +64,9 @@ Example script: This image comes with a phpLDAPadmin config.php file that can be easily customized via environment variables for a quick bootstrap, but setting your own config.php is possible. 2 options: -- Link your config file at run time to `/container/service/phpldapadmin/assets/config.php` : +- Link your config file at run time to `/container/service/phpldapadmin/assets/config/config.php` : - docker run --volume /data/my-config.php:/container/service/phpldapadmin/assets/config.php --detach osixia/phpldapadmin:0.7.0 + docker run --volume /data/my-config.php:/container/service/phpldapadmin/assets/config/config.php --detach osixia/phpldapadmin:0.7.0 - Add your config file by extending or cloning this image, please refer to the [Advanced User Guide](#advanced-user-guide) @@ -231,7 +231,7 @@ Dockerfile example: ADD https-certs /container/service/phpldapadmin/assets/apache2/certs ADD ldap-certs /container/service/ldap-client/assets/certs - ADD my-config.php /container/service/phpldapadmin/assets/config.php + ADD my-config.php /container/service/phpldapadmin/assets/config/config.php ADD environment /container/environment/01-custom diff --git a/image/service/phpldapadmin/assets/README.md b/image/service/phpldapadmin/assets/config/README.md similarity index 51% rename from image/service/phpldapadmin/assets/README.md rename to image/service/phpldapadmin/assets/config/README.md index f7b77d6..7b0d9db 100644 --- a/image/service/phpldapadmin/assets/README.md +++ b/image/service/phpldapadmin/assets/config/README.md @@ -1 +1 @@ -Add your custom config.php file here or mount one at docker run to /container/service/phpldapadmin/assets/config.php +Add your custom config.php file here or mount one at docker run to /container/service/phpldapadmin/assets/config/config.php diff --git a/image/service/phpldapadmin/assets/config.php b/image/service/phpldapadmin/assets/config/config.php similarity index 100% rename from image/service/phpldapadmin/assets/config.php rename to image/service/phpldapadmin/assets/config/config.php diff --git a/image/service/phpldapadmin/startup.sh b/image/service/phpldapadmin/startup.sh index 231bed1..e35222e 100755 --- a/image/service/phpldapadmin/startup.sh +++ b/image/service/phpldapadmin/startup.sh @@ -64,11 +64,11 @@ if [ ! -e "/var/www/phpldapadmin/config/config.php" ]; then # phpLDAPadmin cookie secret get_salt - sed -i "s|{{ PHPLDAPADMIN_CONFIG_BLOWFISH }}|${salt}|g" ${CONTAINER_SERVICE_DIR}/phpldapadmin/assets/config.php + sed -i "s|{{ PHPLDAPADMIN_CONFIG_BLOWFISH }}|${salt}|g" ${CONTAINER_SERVICE_DIR}/phpldapadmin/assets/config/config.php append_to_file() { TO_APPEND=$1 - sed -i "s|{{ PHPLDAPADMIN_SERVERS }}|${TO_APPEND}\n{{ PHPLDAPADMIN_SERVERS }}|g" ${CONTAINER_SERVICE_DIR}/phpldapadmin/assets/config.php + sed -i "s|{{ PHPLDAPADMIN_SERVERS }}|${TO_APPEND}\n{{ PHPLDAPADMIN_SERVERS }}|g" ${CONTAINER_SERVICE_DIR}/phpldapadmin/assets/config/config.php } append_value_to_file() { @@ -129,13 +129,13 @@ if [ ! -e "/var/www/phpldapadmin/config/config.php" ]; then fi done - sed -i "/{{ PHPLDAPADMIN_SERVERS }}/d" ${CONTAINER_SERVICE_DIR}/phpldapadmin/assets/config.php + sed -i "/{{ PHPLDAPADMIN_SERVERS }}/d" ${CONTAINER_SERVICE_DIR}/phpldapadmin/assets/config/config.php touch $FIRST_START_DONE fi - log-helper debug "link ${CONTAINER_SERVICE_DIR}/phpldapadmin/assets/config.php to /var/www/phpldapadmin/config/config.php" - cp -f ${CONTAINER_SERVICE_DIR}/phpldapadmin/assets/config.php /var/www/phpldapadmin/config/config.php + log-helper debug "link ${CONTAINER_SERVICE_DIR}/phpldapadmin/assets/config/config.php to /var/www/phpldapadmin/config/config.php" + cp -f ${CONTAINER_SERVICE_DIR}/phpldapadmin/assets/config/config.php /var/www/phpldapadmin/config/config.php fi From 0c56031ac219880aa8e36454672dba521866102f Mon Sep 17 00:00:00 2001 From: Bertrand Gouny Date: Wed, 19 Jul 2017 22:26:25 +0200 Subject: [PATCH 5/5] Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bcc7730..37281ad 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ push: push-latest: docker push $(NAME):latest -release: build test tag_latest push push_latest +release: build test tag-latest push push-latest git-tag-version: release git tag -a v$(VERSION) -m "v$(VERSION)"