diff options
author | Quentin <quentin@deuxfleurs.fr> | 2020-09-12 10:03:48 +0200 |
---|---|---|
committer | Quentin <quentin@deuxfleurs.fr> | 2020-09-12 10:03:48 +0200 |
commit | c4a6cf1534b864d3941c839d4a4dca7e505bd828 (patch) | |
tree | 3e866768cf39ae947def5b205f74fddfb435725d /docker/mariadb | |
parent | 0550647b9348d1e36431400e0832b4340564c658 (diff) | |
download | infrastructure-c4a6cf1534b864d3941c839d4a4dca7e505bd828.tar.gz infrastructure-c4a6cf1534b864d3941c839d4a4dca7e505bd828.zip |
Rebase first step
Diffstat (limited to 'docker/mariadb')
-rw-r--r-- | docker/mariadb/60-disable-dialog.cnf | 3 | ||||
-rw-r--r-- | docker/mariadb/60-ldap.cnf | 3 | ||||
-rw-r--r-- | docker/mariadb/60-remote.cnf | 2 | ||||
-rw-r--r-- | docker/mariadb/Dockerfile | 14 | ||||
-rw-r--r-- | docker/mariadb/README.md | 19 | ||||
-rwxr-xr-x | docker/mariadb/entrypoint.sh | 50 | ||||
-rw-r--r-- | docker/mariadb/nsswitch.conf | 21 | ||||
-rw-r--r-- | docker/mariadb/pam-mariadb | 2 |
8 files changed, 0 insertions, 114 deletions
diff --git a/docker/mariadb/60-disable-dialog.cnf b/docker/mariadb/60-disable-dialog.cnf deleted file mode 100644 index d41731a..0000000 --- a/docker/mariadb/60-disable-dialog.cnf +++ /dev/null @@ -1,3 +0,0 @@ -[mariadb] -pam_use_cleartext_plugin -bind-address = 0.0.0.0 diff --git a/docker/mariadb/60-ldap.cnf b/docker/mariadb/60-ldap.cnf deleted file mode 100644 index 72ffb9f..0000000 --- a/docker/mariadb/60-ldap.cnf +++ /dev/null @@ -1,3 +0,0 @@ -[mariadb] -plugin-load=auth_pam.so - diff --git a/docker/mariadb/60-remote.cnf b/docker/mariadb/60-remote.cnf deleted file mode 100644 index f759a49..0000000 --- a/docker/mariadb/60-remote.cnf +++ /dev/null @@ -1,2 +0,0 @@ -[mysqld] -bind-address = 0.0.0.0 diff --git a/docker/mariadb/Dockerfile b/docker/mariadb/Dockerfile deleted file mode 100644 index 15ef954..0000000 --- a/docker/mariadb/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM debian:stretch - -RUN apt-get update && \ - apt-get dist-upgrade -y && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y mariadb-server mariadb-client libnss-ldapd - -COPY 60-ldap.cnf /etc/mysql/mariadb.conf.d/60-ldap.cnf -COPY 60-remote.cnf /etc/mysql/mariadb.conf.d/60-remote.cnf -COPY 60-disable-dialog.cnf /etc/mysql/mariadb.conf.d/60-disable-dialog.cnf -COPY pam-mariadb /etc/pam.d/mariadb -COPY nsswitch.conf /etc/nsswitch.conf -COPY entrypoint.sh /usr/local/bin/entrypoint - -ENTRYPOINT ["/usr/local/bin/entrypoint"] diff --git a/docker/mariadb/README.md b/docker/mariadb/README.md deleted file mode 100644 index 1a3b8aa..0000000 --- a/docker/mariadb/README.md +++ /dev/null @@ -1,19 +0,0 @@ -``` -sudo docker build -t superboum/amd64_mariadb:v3 . - -sudo docker run \ - -t -i \ - -p 3306:3306 \ - -v /tmp/mysql:/var/lib/mysql \ - -e LDAP_URI='ldap://bottin.service.2.cluster.deuxfleurs.fr' \ - -e LDAP_BASE='ou=users,dc=deuxfleurs,dc=fr' \ - -e LDAP_VERSION=3 \ - -e LDAP_BIND_DN='cn=admin,dc=deuxfleurs,dc=fr' \ - -e LDAP_BIND_PW='xxxx' \ - -e MYSQL_PASSWORD='xxxx' \ - superboum/amd64_mariadb:v1 \ - tail -f /var/log/mysql/error.log - -CREATE USER quentin@localhost IDENTIFIED VIA pam USING 'mariadb'; - -``` diff --git a/docker/mariadb/entrypoint.sh b/docker/mariadb/entrypoint.sh deleted file mode 100755 index 7ebf049..0000000 --- a/docker/mariadb/entrypoint.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash - -set -e - -cat > /etc/nslcd.conf <<EOF -# /etc/nslcd.conf -# nslcd configuration file. See nslcd.conf(5) -# for details. - -# The user and group nslcd should run as. -uid nslcd -gid nslcd - -# The location at which the LDAP server(s) should be reachable. -uri ${LDAP_URI} - -# The search base that will be used for all queries. -base ${LDAP_BASE} - -# The LDAP protocol version to use. -ldap_version ${LDAP_VERSION} - -# The DN to bind with for normal lookups. -binddn ${LDAP_BIND_DN} -bindpw ${LDAP_BIND_PW} - -# The DN used for password modifications by root. -#rootpwmoddn cn=admin,dc=example,dc=com - -# SSL options -#ssl off -#tls_reqcert never -tls_cacertfile /etc/ssl/certs/ca-certificates.crt - -# The search scope. -#scope sub -EOF - -/usr/sbin/nslcd - -chown mysql:mysql /var/lib/mysql -[ -z "$(ls -A /var/lib/mysql)" ] && mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql - -/usr/bin/mysqld_safe & - -until ls /var/run/mysqld/mysqld.sock; do sleep 1; done -/usr/bin/mysqladmin -u root password ${MYSQL_PASSWORD} || true - -exec "$@" - diff --git a/docker/mariadb/nsswitch.conf b/docker/mariadb/nsswitch.conf deleted file mode 100644 index 853348e..0000000 --- a/docker/mariadb/nsswitch.conf +++ /dev/null @@ -1,21 +0,0 @@ -# /etc/nsswitch.conf -# -# Example configuration of GNU Name Service Switch functionality. -# If you have the `glibc-doc-reference' and `info' packages installed, try: -# `info libc "Name Service Switch"' for information about this file. - -passwd: files ldap -group: files ldap -shadow: files ldap -gshadow: files - -hosts: files dns -networks: files - -protocols: db files -services: db files -ethers: db files -rpc: db files - -netgroup: nis - diff --git a/docker/mariadb/pam-mariadb b/docker/mariadb/pam-mariadb deleted file mode 100644 index e1bb814..0000000 --- a/docker/mariadb/pam-mariadb +++ /dev/null @@ -1,2 +0,0 @@ -auth required pam_ldap.so -account required pam_ldap.so |