ldap/Dockerfile

31 lines
867 B
Docker
Raw Permalink Normal View History

2023-11-16 16:53:45 +01:00
FROM debian:bookworm
2020-07-17 22:11:04 +02:00
EXPOSE 389/tcp
2017-09-09 17:54:45 +02:00
ENV DEBIAN_FRONTEND noninteractive \
CONFDIR /etc/ldap/slapd.d \
DATADIR /var/lib/ldap
# add our users and groups first to ensure their IDs get assigned consitently
RUN groupadd -r -g 500 openldap && useradd -r -u 500 -g openldap openldap
2017-09-09 18:05:27 +02:00
RUN apt-get update && \
2017-09-09 17:54:45 +02:00
apt-get install --yes --no-install-recommends \
slapd \
ldap-utils \
2018-10-04 00:29:46 +02:00
gnutls-bin \
ssl-cert \
2017-09-09 17:54:45 +02:00
ca-certificates && \
2018-10-04 00:29:46 +02:00
# allow access to certificates
usermod -a -G ssl-cert openldap && \
2017-09-09 17:54:45 +02:00
# remove the default config, since the entrypoint
2020-07-17 22:11:04 +02:00
# will populate it automatically.
2017-09-09 17:54:45 +02:00
rm -rf /etc/ldap/slapd.d && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY entrypoint.sh /entrypoint.sh
2019-11-10 09:53:21 +01:00
COPY scripts/ /
2017-09-09 17:54:45 +02:00
COPY fixtures/ /usr/share/slapd/fixtures/
ENTRYPOINT ["/entrypoint.sh"]