Skip to content
Permalink
Browse files
more format
  • Loading branch information
shawnmckinney committed Jan 2, 2022
1 parent 9e7fed4 commit 5ca33ba16b6af2f09da3fb2d4f33888b696c6594
Showing 1 changed file with 19 additions and 18 deletions.
@@ -18,30 +18,31 @@
#
FROM debian:bullseye-slim
# Setup openldap package:
RUN apt-get update && apt-get install -y --no-install-recommends\
gnupg\
ca-certificates\
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys DA26A148887DCBEB\
&& echo 'deb https://repo.symas.com/repo/deb/main/release25 bullseye main' > /etc/apt/sources.list.d/soldap-release25.list\
RUN apt-get update && apt-get install -y --no-install-recommends \
gnupg \
ca-certificates \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys DA26A148887DCBEB \
&& echo 'deb https://repo.symas.com/repo/deb/main/release25 bullseye main' > /etc/apt/sources.list.d/soldap-release25.list \
# Install openldap
&& apt-get update && apt-get install -y --no-install-recommends\
symas-openldap-clients\
symas-openldap-server\
&& rm -rf /var/lib/apt/lists/*
&& apt-get update && apt-get install -y --no-install-recommends \
symas-openldap-clients \
symas-openldap-server \
&& rm -rf /var/lib/apt/lists/* \
&& rm /etc/apt/sources.list.d/soldap-release25.list

# Add fortress schema and slapd config
ADD ldap/schema/*.schema /opt/symas/etc/openldap/schema/
ADD src/docker/openldap-for-apache-fortress-tests/slapd.conf /opt/symas/etc/openldap/
# Create run and db directories, create slapd user and group, prepare runtime env:
RUN mkdir -p /var/run/openldap\
&& mkdir -p "/var/symas/openldap-data/dc=example,dc=com"\
&& mkdir -p "/var/symas/openldap-data/cn=log"\
&& groupadd openldap\
&& useradd openldap -g openldap\
&& chown -R openldap:openldap /opt/symas/lib/\
&& chown -R openldap:openldap /var/run/openldap/\
&& chown -R openldap:openldap /opt/symas/etc/openldap/\
&& chown -R openldap:openldap /var/symas/openldap-data/\
RUN mkdir -p /var/run/openldap \
&& mkdir -p "/var/symas/openldap-data/dc=example,dc=com" \
&& mkdir -p "/var/symas/openldap-data/cn=log" \
&& groupadd openldap \
&& useradd openldap -g openldap \
&& chown -R openldap:openldap /opt/symas/lib/ \
&& chown -R openldap:openldap /var/run/openldap/ \
&& chown -R openldap:openldap /opt/symas/etc/openldap/ \
&& chown -R openldap:openldap /var/symas/openldap-data/ \
&& /opt/symas/sbin/slaptest -u -f /opt/symas/etc/openldap/slapd.conf -u
EXPOSE 389
# Start daemon as non-root user:

0 comments on commit 5ca33ba

Please sign in to comment.