FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN echo 'slapd slapd/password1 password yoda' | debconf-set-selections
RUN echo 'slapd slapd/password2 password yoda' | debconf-set-selections
RUN apt-get update && apt-get install --no-install-recommends -y sudo slapd ldap-utils rsyslog
COPY . .
RUN sh /openldap-start-and-configure.sh | tee /openldap-start-and-configure.log
CMD sh -c "/etc/init.d/slapd start && sleep infinity"
