Skip to content

Commit

Permalink
Merge branch 'release-0.8.0' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
BertrandGouny committed May 29, 2019
2 parents 2935dfc + cf50ada commit 4a942a3
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 174 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [0.8.0] - 2019-05-29
### Changed
- phpLDAPadmin 1.2.4
- Upgrade baseimage to web-baseimage:1.1.2

## [0.7.2] - 2018-09-04
### Added
- Ability to sepcifiy different values for ldap 'host' and 'name' #46
Expand Down Expand Up @@ -93,6 +98,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [0.5.0] - 2015-03-03
New version initial release, no changelog before this sorry.

[0.8.0]: https://github.com/osixia/docker-phpLDAPadmin/compare/v0.7.2...v0.8.0
[0.7.2]: https://github.com/osixia/docker-phpLDAPadmin/compare/v0.7.1...v0.7.2
[0.7.1]: https://github.com/osixia/docker-phpLDAPadmin/compare/v0.7.0...v0.7.1
[0.7.0]: https://github.com/osixia/docker-phpLDAPadmin/compare/v0.6.12...v0.7.0
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NAME = osixia/phpldapadmin
VERSION = 0.7.2
VERSION = 0.8.0

.PHONY: build build-nocache test tag-latest push push-latest release git-tag-version

Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[hub]: https://hub.docker.com/r/osixia/phpldapadmin/

Latest release: 0.7.2 - phpLDAPadmin 1.2.3 (with php7 patch) - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/phpldapadmin/) 
Latest release: 0.8.0 - phpLDAPadmin 1.2.4 (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)
Expand All @@ -27,7 +27,7 @@ Latest release: 0.7.2 - phpLDAPadmin 1.2.3 (with php7 patch) - [Changelog](CHANG
- [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.7.2 image](#extend-osixiaphpldapadmin072-image)
- [Extend osixia/phpldapadmin:0.8.0 image](#extend-osixiaphpldapadmin080-image)
- [Make your own phpLDAPadmin image](#make-your-own-phpldapadmin-image)
- [Tests](#tests)
- [Kubernetes](#kubernetes)
Expand All @@ -41,7 +41,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.7.2
--detach osixia/phpldapadmin:0.8.0

That's it :) you can access phpLDAPadmin on [https://localhost:6443](https://localhost:6443)

Expand All @@ -51,7 +51,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.7.2
docker run --name phpldapadmin-service --hostname phpldapadmin-service --link ldap-service:ldap-host --env PHPLDAPADMIN_LDAP_HOSTS=ldap-host --detach osixia/phpldapadmin:0.8.0

PHPLDAP_IP=$(docker inspect -f "{{ .NetworkSettings.IPAddress }}" phpldapadmin-service)

Expand All @@ -68,7 +68,7 @@ but setting your own config.php is possible. 2 options:

- 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/config.php --detach osixia/phpldapadmin:0.7.2
docker run --volume /data/my-config.php:/container/service/phpldapadmin/assets/config/config.php --detach osixia/phpldapadmin:0.8.0

- Add your config file by extending or cloning this image, please refer to the [Advanced User Guide](#advanced-user-guide)

Expand All @@ -77,7 +77,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.7.2
docker run --hostname phpldapadmin.my-company.com --detach osixia/phpldapadmin:0.8.0

#### Use your own certificate

Expand All @@ -87,22 +87,22 @@ 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.7.2
--detach osixia/phpldapadmin:0.8.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.7.2
docker run --env PHPLDAPADMIN_HTTPS=false --detach osixia/phpldapadmin:0.8.0

### Fix docker mounted file problems

You may have some problems with mounted files on some systems. The startup script try to make some file adjustment and fix files owner and permissions, this can result in multiple errors. See [Docker documentation](https://docs.docker.com/v1.4/userguide/dockervolumes/#mount-a-host-file-as-a-data-volume).

To fix that run the container with `--copy-service` argument :

docker run [your options] osixia/phpldapadmin:0.7.2 --copy-service
docker run [your options] osixia/phpldapadmin:0.8.0 --copy-service

### Debug

Expand All @@ -111,11 +111,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.7.2 --loglevel debug
docker run --detach osixia/phpldapadmin:0.8.0 --loglevel debug

See all command line options:

docker run osixia/phpldapadmin:0.7.2 --help
docker run osixia/phpldapadmin:0.8.0 --help

## Environment Variables

Expand Down Expand Up @@ -168,7 +168,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.7.2
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.8.0

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

Expand Down Expand Up @@ -215,14 +215,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.7.2
--detach osixia/phpldapadmin:0.8.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.7.2
--detach osixia/phpldapadmin:0.8.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).

Expand All @@ -232,13 +232,13 @@ This is the best solution if you have a private registry. Please refer to the [A

## Advanced User Guide

### Extend osixia/phpldapadmin:0.7.2 image
### Extend osixia/phpldapadmin:0.8.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.7.2
FROM osixia/phpldapadmin:0.8.0
MAINTAINER Your Name <your@name.com>

ADD https-certs /container/service/phpldapadmin/assets/apache2/certs
Expand Down
2 changes: 1 addition & 1 deletion example/kubernetes/phpldapadmin-rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: phpldapadmin
image: osixia/phpldapadmin:0.7.2
image: osixia/phpldapadmin:0.8.0
volumeMounts:
- name: phpldapadmin-certs
mountPath: /container/service/phpldapadmin/assets/apache2/certs
Expand Down
13 changes: 5 additions & 8 deletions image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
FROM osixia/web-baseimage:1.1.1
FROM osixia/web-baseimage:1.1.2

# phpLDAPadmin version
ARG PHPLDAPADMIN_VERSION=1.2.3
ARG PHPLDAPADMIN_SHA1=669fca66c75e24137e106fdd02e3832f81146e23
ARG PHPLDAPADMIN_VERSION=1.2.4

# 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
Expand All @@ -19,16 +18,14 @@ RUN apt-get update \
&& LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates \
curl \
patch \
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 - \
&& curl -o phpldapadmin.tar.gz -SL https://github.com/leenooks/phpLDAPadmin/archive/${PHPLDAPADMIN_VERSION}.tar.gz \
&& mkdir -p /var/www/phpldapadmin_bootstrap /var/www/phpldapadmin \
&& tar -xzf phpldapadmin.tgz --strip 1 -C /var/www/phpldapadmin_bootstrap \
&& tar -xzf phpldapadmin.tar.gz --strip 1 -C /var/www/phpldapadmin_bootstrap \
&& apt-get remove -y --purge --auto-remove curl ca-certificates \
&& rm phpldapadmin.tgz \
&& rm phpldapadmin.tar.gz \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

Expand Down
144 changes: 0 additions & 144 deletions image/service/phpldapadmin/assets/php5.5.patch

This file was deleted.

4 changes: 0 additions & 4 deletions image/service/phpldapadmin/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,3 @@ a2enmod deflate expires

# delete unnecessary files
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

0 comments on commit 4a942a3

Please sign in to comment.