openldap_docker/Dockerfile
2024-01-29 16:52:14 +03:30

28 lines
956 B
Docker

FROM ubuntu:22.04
LABEL version="1.0.0"
MAINTAINER "Reza Behzadan <reza@behzadan.ir>"
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -yq --no-install-recommends debconf-utils && \
echo "slapd slapd/internal/adminpw password 123" | debconf-set-selections && \
echo "slapd slapd/internal/generated_adminpw password 123" | debconf-set-selections && \
echo "slapd slapd/password2 password 123" | debconf-set-selections && \
echo "slapd slapd/password1 password 123" | debconf-set-selections && \
echo "slapd slapd/domain string example.com" | debconf-set-selections && \
echo "slapd shared/organization string example" | debconf-set-selections && \
apt-get install -yq --no-install-recommends slapd ldap-utils && \
apt-get autoremove -yq && apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
EXPOSE 389
CMD ["/entrypoint.sh"]