stuff for tests with MySqlConnector for dotnet
This commit is contained in:
@ -5,7 +5,6 @@ stages:
|
|||||||
|
|
||||||
variables:
|
variables:
|
||||||
IMAGE_NAME: registry.gitlab.com/wolutator/mariadb-with-ldap-pam
|
IMAGE_NAME: registry.gitlab.com/wolutator/mariadb-with-ldap-pam
|
||||||
HUB_IMAGE_NAME: wollud1969/mariadb-with-ldap-pam
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
@ -15,11 +14,7 @@ build:
|
|||||||
- docker
|
- docker
|
||||||
script:
|
script:
|
||||||
- VERSION=`cat VERSION`
|
- VERSION=`cat VERSION`
|
||||||
- docker build --tag $IMAGE_NAME:latest --tag $IMAGE_NAME:$VERSION --tag $HUB_IMAGE_NAME:$VERSION --tag $HUB_IMAGE_NAME:latest .
|
- docker build --tag $IMAGE_NAME:$VERSION .
|
||||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||||
- docker push $IMAGE_NAME:latest
|
|
||||||
- docker push $IMAGE_NAME:$VERSION
|
- docker push $IMAGE_NAME:$VERSION
|
||||||
- docker login -u $DOCKER_HUB_LOGIN -p $DOCKER_HUB_PASSWORD
|
|
||||||
- docker push $HUB_IMAGE_NAME:latest
|
|
||||||
- docker push $HUB_IMAGE_NAME:$VERSION
|
|
||||||
|
|
||||||
|
14
Dockerfile
14
Dockerfile
@ -4,10 +4,10 @@ LABEL Maintainer="Wolfgang Hottgenroth <wolfgang.hottgenroth@icloud.com>"
|
|||||||
LABEL ImageName="registry.gitlab.com/wolutator/mariadb-with-ldap-pam"
|
LABEL ImageName="registry.gitlab.com/wolutator/mariadb-with-ldap-pam"
|
||||||
LABEL AlternativeImageName="wollud1969/mariadb-with-ldap-pam"
|
LABEL AlternativeImageName="wollud1969/mariadb-with-ldap-pam"
|
||||||
|
|
||||||
ENV LDAPBASE "DC=hottis,DC=de"
|
ENV LDAPBASE "dc=example,dc=org"
|
||||||
ENV LDAPURI "ldap://ldap.hottis.de:389"
|
ENV LDAPURI "ldap://ldapserver:389"
|
||||||
ENV LDAPBINDDB ""
|
ENV LDAPBINDDN "cn=admin,dc=example,dc=org"
|
||||||
ENV LDAPBINDPW ""
|
ENV LDAPBINDPW "admin"
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
@ -19,6 +19,12 @@ COPY pam.conf-tail /etc
|
|||||||
COPY ldap.conf-tmpl /etc
|
COPY ldap.conf-tmpl /etc
|
||||||
COPY load_pam_plugin.cnf /etc/mysql/conf.d
|
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 \
|
RUN \
|
||||||
cd /usr/local/bin && \
|
cd /usr/local/bin && \
|
||||||
tail -n +2 docker-entrypoint.sh > docker-entrypoint.sh-tail && \
|
tail -n +2 docker-entrypoint.sh > docker-entrypoint.sh-tail && \
|
||||||
|
@ -1,18 +1,8 @@
|
|||||||
base %LDAPBASE%
|
base dc=example,dc=org
|
||||||
uri %LDAPURI%
|
uri ldap://ldapserver
|
||||||
binddn %LDAPBINDDN%
|
binddn cn=admin,dc=example,dc=org
|
||||||
bindpw %LDAPBINDPW%
|
bindpw admin
|
||||||
ldap_version 3
|
ldap_version 3
|
||||||
referrals off
|
referrals off
|
||||||
pam_login_attribute samaccountname
|
pam_login_attribute cn
|
||||||
pam_member_attribute member
|
pam_filter objectclass=Person
|
||||||
nss_map_objectclass posixAccount user
|
|
||||||
nss_map_objectclass shadowAccount user
|
|
||||||
nss_map_attribute uid sAMAccountName
|
|
||||||
nss_map_attribute homeDirectory unixHomeDirectory
|
|
||||||
nss_map_attribute shadowLastChange pwdLastSet
|
|
||||||
nss_map_objectclass posixGroup group
|
|
||||||
nss_map_attribute uniqueMember member
|
|
||||||
pam_login_attribute sAMAccountName
|
|
||||||
pam_filter objectclass=User
|
|
||||||
pam_password ad
|
|
||||||
|
@ -5,9 +5,9 @@ pam_use_cleartext_plugin = ON
|
|||||||
# create these stuff and enable the following configuration
|
# create these stuff and enable the following configuration
|
||||||
# otherwise the pam_use_cleartext_plugin won't work which
|
# otherwise the pam_use_cleartext_plugin won't work which
|
||||||
# is required for dotnet connections
|
# is required for dotnet connections
|
||||||
# ssl_cert = /etc/mysql/conf.d/ssl/server-cert.pem
|
ssl_cert = /etc/mysql/conf.d/ssl/server-cert.pem
|
||||||
# ssl_key = /etc/mysql/conf.d/ssl/server-key.pem
|
ssl_key = /etc/mysql/conf.d/ssl/server-key.pem
|
||||||
# ssl_ca = /etc/mysql/conf.d/ssl/ca.pem
|
ssl_ca = /etc/mysql/conf.d/ssl/ca.pem
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user