FROM mariadb:10.4 LABEL Maintainer="Wolfgang Hottgenroth " LABEL ImageName="registry.gitlab.com/wolutator/mariadb-with-ldap-pam" LABEL AlternativeImageName="wollud1969/mariadb-with-ldap-pam" ENV LDAPBASE "dc=example,dc=org" ENV LDAPURI "ldap://ldapserver:389" ENV LDAPBINDDN "cn=admin,dc=example,dc=org" ENV LDAPBINDPW "admin" RUN \ apt-get update && \ env DEBIAN_FRONTEND=noninteractive apt-get -yq install libpam-ldap && \ env DEBIAN_FRONTEND=noninteractive apt-get -yq install pamtester COPY docker-entrypoint.sh-head /usr/local/bin COPY pam.conf-tail /etc COPY ldap.conf-tmpl /etc COPY load_pam_plugin.cnf /etc/mysql/conf.d RUN mkdir /etc/mysql/conf.d/ssl COPY test/ca.pem /etc/mysql/conf.d/ssl/ COPY test/server-cert.pem /etc/mysql/conf.d/ssl/ COPY test/server-key.pem /etc/mysql/conf.d/ssl/ RUN \ cd /usr/local/bin && \ tail -n +2 docker-entrypoint.sh > docker-entrypoint.sh-tail && \ cat docker-entrypoint.sh-head docker-entrypoint.sh-tail > docker-entrypoint.sh && \ cd /etc && \ cat pam.conf-tail >> pam.conf && \ chmod 644 /etc/mysql/conf.d/load_pam_plugin.cnf