Skip to content

Commit 6d1b92e

Browse files
committed
Merge branch 'release-0.9.0' into stable
2 parents d868f20 + 1c3dc57 commit 6d1b92e

File tree

11 files changed

+156
-36
lines changed

11 files changed

+156
-36
lines changed

.travis.yml

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
language: bash
2+
3+
services:
4+
- docker
5+
env:
6+
global:
7+
- NAME="osixia/phpldapadmin"
8+
- VERSION="${TRAVIS_BRANCH}-dev"
9+
matrix:
10+
- TARGET_ARCH=amd64 QEMU_ARCH=x86_64
11+
- TARGET_ARCH=arm32v7 QEMU_ARCH=arm
12+
- TARGET_ARCH=arm64v8 QEMU_ARCH=aarch64
13+
14+
addons:
15+
apt:
16+
# The docker manifest command was added in docker-ee version 18.x
17+
# So update our current installation and we also have to enable the experimental features.
18+
sources:
19+
- sourceline: "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
20+
key_url: "https://download.docker.com/linux/ubuntu/gpg"
21+
packages:
22+
- docker-ce
23+
24+
before_install:
25+
- docker --version
26+
- mkdir $HOME/.docker
27+
- 'echo "{" > $HOME/.docker/config.json'
28+
- 'echo " \"experimental\": \"enabled\"" >> $HOME/.docker/config.json'
29+
- 'echo "}" >> $HOME/.docker/config.json'
30+
- sudo service docker restart
31+
32+
install:
33+
# For cross buidling our images
34+
# This is necessary because travis-ci.org has only x86_64 machines.
35+
# If travis-ci.org gets native arm builds, probably this step is not
36+
# necessary any more.
37+
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
38+
# Bats is necessary for the UT
39+
- curl -o bats.tar.gz -SL https://github.com/bats-core/bats-core/archive/v1.1.0.tar.gz
40+
- mkdir bats-core && tar -xf bats.tar.gz -C bats-core --strip-components=1
41+
- cd bats-core/
42+
- sudo ./install.sh /usr/local
43+
- cd ..
44+
45+
before_script:
46+
# Set baseimage.
47+
- sed -i -e "s/FROM \(.*\)/FROM \1-${TARGET_ARCH}/g" image/Dockerfile;
48+
- cat image/Dockerfile;
49+
# If this is a tag then change the VERSION variable to only have the
50+
# tag name and not also the commit hash.
51+
- if [ -n "$TRAVIS_TAG" ]; then
52+
VERSION=$(echo "${TRAVIS_TAG}" | sed -e 's/\(.*\)[-v]\(.*\)/\1\2/g');
53+
fi
54+
- if [ "${TRAVIS_BRANCH}" == 'stable' ]; then
55+
VERSION="stable";
56+
fi
57+
58+
script:
59+
- make build-nocache NAME=${NAME} VERSION=${VERSION}-${TARGET_ARCH}
60+
# Run the test and if the test fails mark the build as failed.
61+
- make test NAME=${NAME} VERSION=${VERSION}-${TARGET_ARCH}
62+
63+
before_deploy:
64+
- docker run -d --name test_image ${NAME}:${VERSION}-${TARGET_ARCH} sleep 10
65+
- sleep 5
66+
- sudo docker ps | grep -q test_image
67+
# To have `DOCKER_USER` and `DOCKER_PASS`
68+
# use `travis env set`.
69+
- docker login -u "$DOCKER_USER" -p "$DOCKER_PASS";
70+
- make tag NAME=${NAME} VERSION=${VERSION}-${TARGET_ARCH}
71+
72+
deploy:
73+
provider: script
74+
on:
75+
all_branches: true
76+
script: make push NAME=${NAME} VERSION=${VERSION}-${TARGET_ARCH}
77+
78+
jobs:
79+
include:
80+
- stage: Manifest creation
81+
install: skip
82+
script: skip
83+
after_deploy:
84+
- docker login -u "$DOCKER_USER" -p "$DOCKER_PASS";
85+
- docker manifest create ${NAME}:${VERSION} ${NAME}:${VERSION}-amd64 ${NAME}:${VERSION}-arm32v7 ${NAME}:${VERSION}-arm64v8;
86+
docker manifest annotate ${NAME}:${VERSION} ${NAME}:${VERSION}-amd64 --os linux --arch amd64;
87+
docker manifest annotate ${NAME}:${VERSION} ${NAME}:${VERSION}-arm32v7 --os linux --arch arm --variant v7;
88+
docker manifest annotate ${NAME}:${VERSION} ${NAME}:${VERSION}-arm64v8 --os linux --arch arm64 --variant v8;
89+
90+
# The latest tag is coming from the stable branch of the repo
91+
- if [ "${TRAVIS_BRANCH}" == 'stable' ]; then
92+
docker manifest create ${NAME}:latest ${NAME}:${VERSION}-amd64 ${NAME}:${VERSION}-arm32v7 ${NAME}:${VERSION}-arm64v8;
93+
docker manifest annotate ${NAME}:latest ${NAME}:${VERSION}-amd64 --os linux --arch amd64;
94+
docker manifest annotate ${NAME}:latest ${NAME}:${VERSION}-arm32v7 --os linux --arch arm --variant v7;
95+
docker manifest annotate ${NAME}:latest ${NAME}:${VERSION}-arm64v8 --os linux --arch arm64 --variant v8;
96+
fi
97+
98+
- docker manifest push ${NAME}:${VERSION};
99+
if [ "${TRAVIS_BRANCH}" == 'stable' ]; then
100+
docker manifest push ${NAME}:latest;
101+
fi

CHANGELOG.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,17 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [0.9.0] - 2019-09-29
8+
## Added
9+
- Multiarch support
10+
11+
### Changed
12+
- Upgrade phpLDAPadmin to 1.2.5
13+
- Upgrade baseimage to web-baseimage:1.2.0 (debian buster)
14+
715
## [0.8.0] - 2019-05-29
816
### Changed
9-
- phpLDAPadmin 1.2.4
17+
- Upgrade phpLDAPadmin 1.2.4
1018
- Upgrade baseimage to web-baseimage:1.1.2
1119

1220
## [0.7.2] - 2018-09-04
@@ -98,6 +106,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
98106
## [0.5.0] - 2015-03-03
99107
New version initial release, no changelog before this sorry.
100108

109+
[0.9.0]: https://github.com/osixia/docker-phpLDAPadmin/compare/v0.8.0...v0.9.0
101110
[0.8.0]: https://github.com/osixia/docker-phpLDAPadmin/compare/v0.7.2...v0.8.0
102111
[0.7.2]: https://github.com/osixia/docker-phpLDAPadmin/compare/v0.7.1...v0.7.2
103112
[0.7.1]: https://github.com/osixia/docker-phpLDAPadmin/compare/v0.7.0...v0.7.1

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
NAME = osixia/phpldapadmin
2-
VERSION = 0.8.0
2+
VERSION = 0.9.0
33

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

@@ -12,6 +12,9 @@ build-nocache:
1212
test:
1313
env NAME=$(NAME) VERSION=$(VERSION) bats test/test.bats
1414

15+
tag:
16+
docker tag $(NAME):$(VERSION) $(NAME):$(VERSION)
17+
1518
tag-latest:
1619
docker tag $(NAME):$(VERSION) $(NAME):latest
1720

README.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

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

8-
Latest release: 0.8.0 - phpLDAPadmin 1.2.4 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/phpldapadmin/) 
8+
Latest release: 0.9.0 - phpLDAPadmin 1.2.5 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/phpldapadmin/) 
99

1010
**A docker image to run phpLDAPadmin.**
1111
> [phpldapadmin.sourceforge.net](http://phpldapadmin.sourceforge.net)
@@ -27,7 +27,7 @@ Latest release: 0.8.0 - phpLDAPadmin 1.2.4 - [Changelog](CHANGELOG.md) | [Docker
2727
- [Link environment file](#link-environment-file)
2828
- [Make your own image or extend this image](#make-your-own-image-or-extend-this-image)
2929
- [Advanced User Guide](#advanced-user-guide)
30-
- [Extend osixia/phpldapadmin:0.8.0 image](#extend-osixiaphpldapadmin080-image)
30+
- [Extend osixia/phpldapadmin:0.9.0 image](#extend-osixiaphpldapadmin090-image)
3131
- [Make your own phpLDAPadmin image](#make-your-own-phpldapadmin-image)
3232
- [Tests](#tests)
3333
- [Kubernetes](#kubernetes)
@@ -41,7 +41,7 @@ Run a phpLDAPadmin docker image by replacing `ldap.example.com` with your ldap h
4141

4242
docker run -p 6443:443 \
4343
--env PHPLDAPADMIN_LDAP_HOSTS=ldap.example.com \
44-
--detach osixia/phpldapadmin:0.8.0
44+
--detach osixia/phpldapadmin:0.9.0
4545

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

@@ -51,7 +51,7 @@ Example script:
5151

5252
#!/bin/bash -e
5353
docker run --name ldap-service --hostname ldap-service --detach osixia/openldap:1.1.8
54-
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
54+
docker run --name phpldapadmin-service --hostname phpldapadmin-service --link ldap-service:ldap-host --env PHPLDAPADMIN_LDAP_HOSTS=ldap-host --detach osixia/phpldapadmin:0.9.0
5555

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

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

6969
- Link your config file at run time to `/container/service/phpldapadmin/assets/config/config.php` :
7070

71-
docker run --volume /data/my-config.php:/container/service/phpldapadmin/assets/config/config.php --detach osixia/phpldapadmin:0.8.0
71+
docker run --volume /data/my-config.php:/container/service/phpldapadmin/assets/config/config.php --detach osixia/phpldapadmin:0.9.0
7272

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

@@ -77,7 +77,7 @@ but setting your own config.php is possible. 2 options:
7777
#### Use autogenerated certificate
7878
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).
7979

80-
docker run --hostname phpldapadmin.my-company.com --detach osixia/phpldapadmin:0.8.0
80+
docker run --hostname phpldapadmin.my-company.com --detach osixia/phpldapadmin:0.9.0
8181

8282
#### Use your own certificate
8383

@@ -87,22 +87,22 @@ You can set your custom certificate at run time, by mounting a directory contain
8787
--env PHPLDAPADMIN_HTTPS_CRT_FILENAME=my-cert.crt \
8888
--env PHPLDAPADMIN_HTTPS_KEY_FILENAME=my-cert.key \
8989
--env PHPLDAPADMIN_HTTPS_CA_CRT_FILENAME=the-ca.crt \
90-
--detach osixia/phpldapadmin:0.8.0
90+
--detach osixia/phpldapadmin:0.9.0
9191

9292
Other solutions are available please refer to the [Advanced User Guide](#advanced-user-guide)
9393

9494
#### Disable HTTPS
9595
Add --env PHPLDAPADMIN_HTTPS=false to the run command :
9696

97-
docker run --env PHPLDAPADMIN_HTTPS=false --detach osixia/phpldapadmin:0.8.0
97+
docker run --env PHPLDAPADMIN_HTTPS=false --detach osixia/phpldapadmin:0.9.0
9898

9999
### Fix docker mounted file problems
100100

101101
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).
102102

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

105-
docker run [your options] osixia/phpldapadmin:0.8.0 --copy-service
105+
docker run [your options] osixia/phpldapadmin:0.9.0 --copy-service
106106

107107
### Debug
108108

@@ -111,11 +111,11 @@ Available levels are: `none`, `error`, `warning`, `info`, `debug` and `trace`.
111111

112112
Example command to run the container in `debug` mode:
113113

114-
docker run --detach osixia/phpldapadmin:0.8.0 --loglevel debug
114+
docker run --detach osixia/phpldapadmin:0.9.0 --loglevel debug
115115

116116
See all command line options:
117117

118-
docker run osixia/phpldapadmin:0.8.0 --help
118+
docker run osixia/phpldapadmin:0.9.0 --help
119119

120120
## Environment Variables
121121

@@ -168,7 +168,7 @@ See how to [set your own environment variables](#set-your-own-environment-variab
168168
169169
If you want to set this variable at docker run command add the tag `#PYTHON2BASH:` and convert the yaml in python:
170170

171-
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
171+
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.9.0
172172

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

@@ -215,14 +215,14 @@ Other environment variables:
215215
Environment variables can be set by adding the --env argument in the command line, for example:
216216

217217
docker run --env PHPLDAPADMIN_LDAP_HOSTS="ldap.example.org" \
218-
--detach osixia/phpldapadmin:0.8.0
218+
--detach osixia/phpldapadmin:0.9.0
219219

220220
#### Link environment file
221221

222222
For example if your environment file is in : /data/environment/my-env.yaml
223223

224224
docker run --volume /data/environment/my-env.yaml:/container/environment/01-custom/env.yaml \
225-
--detach osixia/phpldapadmin:0.8.0
225+
--detach osixia/phpldapadmin:0.9.0
226226

227227
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).
228228

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

233233
## Advanced User Guide
234234

235-
### Extend osixia/phpldapadmin:0.8.0 image
235+
### Extend osixia/phpldapadmin:0.9.0 image
236236

237237
If you need to add your custom TLS certificate, bootstrap config or environment files the easiest way is to extends this image.
238238

239239
Dockerfile example:
240240

241-
FROM osixia/phpldapadmin:0.8.0
241+
FROM osixia/phpldapadmin:0.9.0
242242
MAINTAINER Your Name <[email protected]>
243243

244244
ADD https-certs /container/service/phpldapadmin/assets/apache2/certs
@@ -260,7 +260,7 @@ Clone this project :
260260
Adapt Makefile, set your image NAME and VERSION, for example :
261261

262262
NAME = osixia/phpldapadmin
263-
VERSION = 0.7.0
263+
VERSION = 0.9.0
264264

265265
becomes :
266266
NAME = billy-the-king/phpldapadmin

example/kubernetes/phpldapadmin-rc.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ spec:
1515
spec:
1616
containers:
1717
- name: phpldapadmin
18-
image: osixia/phpldapadmin:0.8.0
18+
image: osixia/phpldapadmin:0.9.0
1919
volumeMounts:
2020
- name: phpldapadmin-certs
2121
mountPath: /container/service/phpldapadmin/assets/apache2/certs

image/Dockerfile

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
FROM osixia/web-baseimage:1.1.2
1+
FROM osixia/web-baseimage:release-1.2.0-dev
22

33
# phpLDAPadmin version
4-
ARG PHPLDAPADMIN_VERSION=1.2.4
4+
ARG PHPLDAPADMIN_VERSION=1.2.5
55

6-
# Add multiple process stack to supervise apache2 and php7.0-fpm
6+
# Add multiple process stack to supervise apache2 and php7.3-fpm
77
# sources: https://github.com/osixia/docker-light-baseimage/blob/stable/image/tool/add-multiple-process-stack
88
# https://github.com/osixia/docker-light-baseimage/blob/stable/image/tool/add-service-available
99
#  https://github.com/osixia/docker-web-baseimage/blob/stable/image/service-available/:apache2/download.sh
10-
# https://github.com/osixia/docker-web-baseimage/blob/stable/image/service-available/:php7.0-fpm/download.sh
10+
# https://github.com/osixia/docker-web-baseimage/blob/stable/image/service-available/:php7.3-fpm/download.sh
1111
# https://github.com/osixia/light-baseimage/blob/stable/image/service-available/:ssl-tools/download.sh
1212
# Install ca-certificates, curl and php dependencies
1313
# Download phpLDAPadmin, check file integrity, and unzip phpLDAPadmin to /var/www/phpldapadmin_bootstrap
1414
# Remove curl
1515
RUN apt-get update \
1616
&& /container/tool/add-multiple-process-stack \
17-
&& /container/tool/add-service-available :apache2 :php7.0-fpm :ssl-tools \
17+
&& /container/tool/add-service-available :apache2 :php7.3-fpm :ssl-tools \
1818
&& LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
1919
ca-certificates \
2020
curl \
21-
php7.0-ldap \
22-
php7.0-readline \
23-
php7.0-xml \
21+
php7.3-ldap \
22+
php7.3-readline \
23+
php7.3-xml \
2424
&& curl -o phpldapadmin.tar.gz -SL https://github.com/leenooks/phpLDAPadmin/archive/${PHPLDAPADMIN_VERSION}.tar.gz \
2525
&& mkdir -p /var/www/phpldapadmin_bootstrap /var/www/phpldapadmin \
2626
&& tar -xzf phpldapadmin.tar.gz --strip 1 -C /var/www/phpldapadmin_bootstrap \

image/environment/default.startup.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ PHPLDAPADMIN_LDAP_CLIENT_TLS_KEY_FILENAME: ldap-client.key
1717
# ssl-helper environment variables prefix
1818
LDAP_CLIENT_SSL_HELPER_PREFIX: ldap # ssl-helper first search config from LDAP_SSL_HELPER_* variables, before SSL_HELPER_* variables.
1919

20-
SSL_HELPER_AUTO_RENEW_SERVICES_IMPACTED: :apache2 :php7.0-fpm
20+
SSL_HELPER_AUTO_RENEW_SERVICES_IMPACTED: :apache2 :php7.3-fpm

image/service/phpldapadmin/install.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash -e
22
# this script is run during the image build
33

4-
cat /container/service/phpldapadmin/assets/php7.0-fpm/pool.conf >> /etc/php/7.0/fpm/pool.d/www.conf
5-
rm /container/service/phpldapadmin/assets/php7.0-fpm/pool.conf
4+
cat /container/service/phpldapadmin/assets/php7.3-fpm/pool.conf >> /etc/php/7.3/fpm/pool.d/www.conf
5+
rm /container/service/phpldapadmin/assets/php7.3-fpm/pool.conf
66

7-
cp -f /container/service/phpldapadmin/assets/php7.0-fpm/opcache.ini /etc/php/7.0/fpm/conf.d/opcache.ini
8-
rm /container/service/phpldapadmin/assets/php7.0-fpm/opcache.ini
7+
cp -f /container/service/phpldapadmin/assets/php7.3-fpm/opcache.ini /etc/php/7.3/fpm/conf.d/opcache.ini
8+
rm /container/service/phpldapadmin/assets/php7.3-fpm/opcache.ini
99

1010
mkdir -p /var/www/tmp
1111
chown www-data:www-data /var/www/tmp

test/test.bats

+10-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ load test_helper
1313
tmp_file="$BATS_TMPDIR/docker-test"
1414

1515
run_image
16-
wait_process apache2 php-fpm7.0
16+
wait_process apache2 php-fpm7.3
17+
18+
sleep 5
19+
1720
curl --silent --insecure https://$CONTAINER_IP >> $tmp_file
1821
run grep -c "Use the menu to the left to navigate" $tmp_file
1922
rm $tmp_file
@@ -29,7 +32,7 @@ load test_helper
2932
tmp_file="$BATS_TMPDIR/docker-test"
3033

3134
# we start a new openldap container
32-
LDAP_CID=$(docker run -d osixia/openldap:1.1.9)
35+
LDAP_CID=$(docker run -d osixia/openldap)
3336
LDAP_IP=$(get_container_ip_by_cid $LDAP_CID)
3437

3538
# we start the wordpress container and set DB_HOSTS
@@ -38,8 +41,12 @@ load test_helper
3841
# wait openldap
3942
wait_process_by_cid $LDAP_CID slapd
4043

44+
sleep 5
45+
4146
# wait phpLDAPadmin container apache2 service
42-
wait_process apache2 php-fpm7.0
47+
wait_process apache2 php-fpm7.3
48+
49+
sleep 5
4350

4451
curl -L --silent --insecure -c $BATS_TMPDIR/cookie.txt https://$CONTAINER_IP >> $tmp_file
4552

0 commit comments

Comments
 (0)