diff --git a/Makefile b/Makefile index 207e835..6d97ee9 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ NAME = osixia/openldap -VERSION = 1.4.0 +VERSION = 1.5.0 .PHONY: build build-nocache test tag-latest push push-latest release git-tag-version diff --git a/README.md b/README.md index 21ace0f..8126acb 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Docker Stars](https://img.shields.io/docker/stars/osixia/openldap.svg)](https://hub.docker.com/r/osixia/openldap/) [![Layers](https://images.microbadger.com/badges/image/osixia/openldap.svg)](https://hub.docker.com/r/osixia/openldap/) -Latest release: 1.4.0 - [OpenLDAP 2.4.50](https://www.openldap.org/software/release/changes.html) - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/openldap/)  +Latest release: 1.5.0 - [OpenLDAP 2.4.50](https://www.openldap.org/software/release/changes.html) - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/openldap/)  **A docker image to run OpenLDAP.** @@ -39,7 +39,7 @@ Latest release: 1.4.0 - [OpenLDAP 2.4.50](https://www.openldap.org/software/rele - [Docker Secrets](#docker-secrets) - [Make your own image or extend this image](#make-your-own-image-or-extend-this-image) - [Advanced User Guide](#advanced-user-guide) - - [Extend osixia/openldap:1.4.0 image](#extend-osixiaopenldap140-image) + - [Extend osixia/openldap:1.5.0 image](#extend-osixiaopenldap150-image) - [Make your own openldap image](#make-your-own-openldap-image) - [Tests](#tests) - [Kubernetes](#kubernetes) @@ -60,13 +60,13 @@ If you find this image useful here's how you can help: Run OpenLDAP docker image: ```sh -docker run --name my-openldap-container --detach osixia/openldap:1.4.0 +docker run --name my-openldap-container --detach osixia/openldap:1.5.0 ``` Do not forget to add the port mapping for both port 389 and 636 if you wish to access the ldap server from another machine. ```sh -docker run -p 389:389 -p 636:636 --name my-openldap-container --detach osixia/openldap:1.4.0 +docker run -p 389:389 -p 636:636 --name my-openldap-container --detach osixia/openldap:1.5.0 ``` Either command starts a new container with OpenLDAP running inside. Let's make the first search in our LDAP container: @@ -109,7 +109,7 @@ docker run \ --env LDAP_ORGANISATION="My Company" \ --env LDAP_DOMAIN="my-company.com" \ --env LDAP_ADMIN_PASSWORD="JonSn0w" \ - --detach osixia/openldap:1.4.0 + --detach osixia/openldap:1.5.0 ``` #### Data persistence @@ -174,12 +174,12 @@ argument to entrypoint if you don't want to overwrite them. # single file example: docker run \ --volume ./bootstrap.ldif:/container/service/slapd/assets/config/bootstrap/ldif/50-bootstrap.ldif \ - osixia/openldap:1.4.0 --copy-service + osixia/openldap:1.5.0 --copy-service # directory example: docker run \ --volume ./ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom \ - osixia/openldap:1.4.0 --copy-service + osixia/openldap:1.5.0 --copy-service ``` #### Seed from internal path @@ -213,7 +213,7 @@ simply mount this directories as a volume to `/var/lib/ldap` and `/etc/ldap/slap docker run \ --volume /data/slapd/database:/var/lib/ldap \ --volume /data/slapd/config:/etc/ldap/slapd.d \ - --detach osixia/openldap:1.4.0 + --detach osixia/openldap:1.5.0 ``` You can also use data volume containers. Please refer to: @@ -235,7 +235,7 @@ If you are looking for a simple solution to administrate your ldap server you ca By default, TLS is already configured and enabled, certificate is created using container hostname (it can be set by docker run --hostname option eg: ldap.example.org). ```sh -docker run --hostname ldap.my-company.com --detach osixia/openldap:1.4.0 +docker run --hostname ldap.my-company.com --detach osixia/openldap:1.5.0 ``` #### Use your own certificate @@ -249,7 +249,7 @@ docker run \ --env LDAP_TLS_CRT_FILENAME=my-ldap.crt \ --env LDAP_TLS_KEY_FILENAME=my-ldap.key \ --env LDAP_TLS_CA_CRT_FILENAME=the-ca.crt \ - --detach osixia/openldap:1.4.0 + --detach osixia/openldap:1.5.0 ``` Other solutions are available please refer to the [Advanced User Guide](#advanced-user-guide) @@ -257,17 +257,17 @@ Other solutions are available please refer to the [Advanced User Guide](#advance #### Disable TLS Add --env LDAP_TLS=false to the run command: - docker run --env LDAP_TLS=false --detach osixia/openldap:1.4.0 + docker run --env LDAP_TLS=false --detach osixia/openldap:1.5.0 ### Multi master replication Quick example, with the default config. #Create the first ldap server, save the container id in LDAP_CID and get its IP: - LDAP_CID=$(docker run --hostname ldap.example.org --env LDAP_REPLICATION=true --detach osixia/openldap:1.4.0) + LDAP_CID=$(docker run --hostname ldap.example.org --env LDAP_REPLICATION=true --detach osixia/openldap:1.5.0) LDAP_IP=$(docker inspect -f "{{ .NetworkSettings.IPAddress }}" $LDAP_CID) #Create the second ldap server, save the container id in LDAP2_CID and get its IP: - LDAP2_CID=$(docker run --hostname ldap2.example.org --env LDAP_REPLICATION=true --detach osixia/openldap:1.4.0) + LDAP2_CID=$(docker run --hostname ldap2.example.org --env LDAP_REPLICATION=true --detach osixia/openldap:1.5.0) LDAP2_IP=$(docker inspect -f "{{ .NetworkSettings.IPAddress }}" $LDAP2_CID) #Add the pair "ip hostname" to /etc/hosts on each containers, @@ -303,7 +303,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/openldap:1.4.0 --copy-service + docker run [your options] osixia/openldap:1.5.0 --copy-service ### Debug @@ -313,13 +313,13 @@ Available levels are: `none`, `error`, `warning`, `info`, `debug` and `trace`. Example command to run the container in `debug` mode: ```sh -docker run --detach osixia/openldap:1.4.0 --loglevel debug +docker run --detach osixia/openldap:1.5.0 --loglevel debug ``` See all command line options: ```sh -docker run osixia/openldap:1.4.0 --help +docker run osixia/openldap:1.5.0 --help ``` ## Environment Variables @@ -386,7 +386,7 @@ Replication options: If you want to set this variable at docker run command add the tag `#PYTHON2BASH:` and convert the yaml in python: - docker run --env LDAP_REPLICATION_HOSTS="#PYTHON2BASH:['ldap://ldap.example.org','ldap://ldap2.example.org']" --detach osixia/openldap:1.4.0 + docker run --env LDAP_REPLICATION_HOSTS="#PYTHON2BASH:['ldap://ldap.example.org','ldap://ldap2.example.org']" --detach osixia/openldap:1.5.0 To convert yaml to python online: https://yaml-online-parser.appspot.com/ @@ -413,7 +413,7 @@ docker run \ --env LDAP_ORGANISATION="My company" \ --env LDAP_DOMAIN="my-company.com" \ --env LDAP_ADMIN_PASSWORD="JonSn0w" \ - --detach osixia/openldap:1.4.0 + --detach osixia/openldap:1.5.0 ``` Be aware that environment variable added in command line will be available at any time @@ -427,7 +427,7 @@ For example if your environment files **my-env.yaml** and **my-env.startup.yaml* ```sh docker run \ --volume /data/ldap/environment:/container/environment/01-custom \ - --detach osixia/openldap:1.4.0 + --detach osixia/openldap:1.5.0 ``` Take care to link your environment files folder 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). @@ -437,7 +437,7 @@ Note: the container will try to delete the **\*.startup.yaml** file after the en ```sh docker run \ --volume /data/ldap/environment/my-env.yaml:/container/environment/01-custom/env.yaml \ - --detach osixia/openldap:1.4.0 + --detach osixia/openldap:1.5.0 ``` #### Docker Secrets @@ -463,14 +463,14 @@ This is the best solution if you have a private registry. Please refer to the [A ## Advanced User Guide -### Extend osixia/openldap:1.4.0 image +### Extend osixia/openldap:1.5.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: ```dockerfile -FROM osixia/openldap:1.4.0 +FROM osixia/openldap:1.5.0 LABEL maintainer="Your Name " ADD bootstrap /container/service/slapd/assets/config/bootstrap diff --git a/example/docker-compose.yml b/example/docker-compose.yml index 673c4ad..04a810a 100644 --- a/example/docker-compose.yml +++ b/example/docker-compose.yml @@ -1,7 +1,7 @@ version: '2' services: openldap: - image: osixia/openldap:1.4.0 + image: osixia/openldap:1.5.0 container_name: openldap environment: LDAP_LOG_LEVEL: "256" diff --git a/example/extend-osixia-openldap/Dockerfile b/example/extend-osixia-openldap/Dockerfile index e4371cc..9736749 100644 --- a/example/extend-osixia-openldap/Dockerfile +++ b/example/extend-osixia-openldap/Dockerfile @@ -1,4 +1,4 @@ -FROM osixia/openldap:1.4.0 +FROM osixia/openldap:1.5.0 MAINTAINER Your Name ADD bootstrap /container/service/slapd/assets/config/bootstrap diff --git a/example/kubernetes/simple/ldap-deployment.yaml b/example/kubernetes/simple/ldap-deployment.yaml index bed8c37..d67f8fe 100644 --- a/example/kubernetes/simple/ldap-deployment.yaml +++ b/example/kubernetes/simple/ldap-deployment.yaml @@ -16,7 +16,7 @@ spec: spec: containers: - name: ldap - image: osixia/openldap:1.4.0 + image: osixia/openldap:1.5.0 volumeMounts: - name: ldap-data mountPath: /var/lib/ldap diff --git a/example/kubernetes/using-secrets/gce-statefullset.yaml b/example/kubernetes/using-secrets/gce-statefullset.yaml index 41cbab3..9c2d946 100644 --- a/example/kubernetes/using-secrets/gce-statefullset.yaml +++ b/example/kubernetes/using-secrets/gce-statefullset.yaml @@ -12,7 +12,7 @@ spec: spec: containers: - name: azaldap - image: osixia/openldap:1.4.0 + image: osixia/openldap:1.5.0 imagePullPolicy: IfNotPresent #command: ["/bin/bash","-c","while [ 1 = 1 ] ; do sleep 1; date; done"] ports: diff --git a/example/kubernetes/using-secrets/ldap-deployment.yaml.example b/example/kubernetes/using-secrets/ldap-deployment.yaml.example index f572cdf..115c3b3 100644 --- a/example/kubernetes/using-secrets/ldap-deployment.yaml.example +++ b/example/kubernetes/using-secrets/ldap-deployment.yaml.example @@ -16,7 +16,7 @@ spec: spec: containers: - name: ldap - image: osixia/openldap:1.4.0 + image: osixia/openldap:1.5.0 args: ["--copy-service"] volumeMounts: - name: ldap-data