hrektts / docker-fusiondirectory-openldap

Dockerfile to build a OpenLDAP container image that includes the FusionDirectory schemas
MIT License
1 stars 10 forks source link

New version of fusiondirectory plugins in repository... Dockerfile needs changes :( #3

Open fruisoft opened 6 years ago

fruisoft commented 6 years ago

New version of plugins in repository: http://repos.fusiondirectory.org/fusiondirectory-current/debian-jessie/pool/main/f/fusiondirectory/

I've tried to create a new image only changing the value in Dockerfile: ENV FUSIONDIRECTORY_VERSION=1.2.2-1

But, generate dependencies errors when trying to create a new image:

Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: fusiondirectory-plugin-alias : Depends: fusiondirectory (= 1.2.2-1) but it is not going to be installed Depends: fusiondirectory-plugin-mail (= 1.2.2-1) but it is not going to be installed fusiondirectory-plugin-dns : Depends: fusiondirectory (= 1.2.2-1) but it is not going to be installed fusiondirectory-plugin-dsa : Depends: fusiondirectory (= 1.2.2-1) but it is not going to be installed_

fruisoft commented 6 years ago

Anybody can help me? Thanks ;)

pierregeekme commented 5 years ago

Hello,

If it's not to late, i propose this update :

Dockerfile :

FROM osixia/openldap:1.2.4
LABEL maintainer="mps299792458@gmail.com" \
      version="1.2.4-1.0.0"

ENV FUSIONDIRECTORY_VERSION=1.3-1

RUN gpg --keyserver keys.gnupg.net --recv-key 0xD744D55EACDA69FF &&\
  gpg --export -a "FusionDirectory Project Signing Key <contact@fusiondirectory.org>" > FD-archive-key &&\
  apt-key add FD-archive-key

 RUN (echo "deb http://repos.fusiondirectory.org/fusiondirectory-current/debian-stretch stretch main"; \
     echo "deb http://repos.fusiondirectory.org/fusiondirectory-extra/debian-stretch stretch main") \
    > /etc/apt/sources.list.d/fusiondirectory.list \
 && apt-get update \
 && DEBIAN_FRONTEND=noninteractive apt-get install -y \
    fusiondirectory-schema=${FUSIONDIRECTORY_VERSION} \
    fusiondirectory-plugin-argonaut-schema=${FUSIONDIRECTORY_VERSION} \
    fusiondirectory-plugin-autofs-schema=${FUSIONDIRECTORY_VERSION} \
    fusiondirectory-plugin-dns-schema=${FUSIONDIRECTORY_VERSION} \
    fusiondirectory-plugin-gpg-schema=${FUSIONDIRECTORY_VERSION} \
    fusiondirectory-plugin-mail-schema=${FUSIONDIRECTORY_VERSION} \
    fusiondirectory-plugin-postfix-schema=${FUSIONDIRECTORY_VERSION} \
    fusiondirectory-plugin-ssh-schema=${FUSIONDIRECTORY_VERSION} \
    fusiondirectory-plugin-sudo-schema=${FUSIONDIRECTORY_VERSION} \
    fusiondirectory-plugin-systems-schema=${FUSIONDIRECTORY_VERSION} \
    fusiondirectory-plugin-weblink-schema=${FUSIONDIRECTORY_VERSION} \
    fusiondirectory-plugin-webservice-schema=${FUSIONDIRECTORY_VERSION} \
 && apt-get clean \
 && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

COPY init.sh /sbin/init.sh
RUN chmod 755 /sbin/init.sh
RUN sed -i "/# stop OpenLDAP/i /sbin/init.sh" /container/service/slapd/startup.sh

Script init.sh :

#!/bin/bash
set -e

if [ -e /etc/ldap/schema/fusiondirectory/rfc2307bis.schema ]
then
  mv /etc/ldap/schema/fusiondirectory/rfc2307bis.schema /etc/ldap/schema/fusiondirectory/rfc2307bis.schema.nok
fi

for i in `ls /etc/ldap/schema/fusiondirectory/*.schema`
do
  fusiondirectory-insert-schema -i $i
done

Thank you hrektts for you work.