test: use pre-build openldap base image

This commit is contained in:
Zaiming (Stone) Shi 2023-09-28 23:37:02 +02:00
parent 6edfdf16d3
commit 0ff28afc3d
2 changed files with 1 additions and 15 deletions

View File

@ -6,8 +6,6 @@ services:
build: build:
context: ../.. context: ../..
dockerfile: .ci/docker-compose-file/openldap/Dockerfile dockerfile: .ci/docker-compose-file/openldap/Dockerfile
args:
LDAP_TAG: ${LDAP_TAG}
image: openldap image: openldap
#ports: #ports:
# - 389:389 # - 389:389

View File

@ -1,16 +1,4 @@
FROM ubuntu:20.04 FROM docker.io/zmstone/openldap:2.5.16
ARG LDAP_TAG=2.5.16
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -y
RUN apt-get install -y groff groff-base curl build-essential
RUN curl -o openldap-${LDAP_TAG}.tgz https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-${LDAP_TAG}.tgz \
&& tar xvzf openldap-${LDAP_TAG}.tgz \
&& cd openldap-${LDAP_TAG} \
&& ./configure && make depend && make && make install \
&& cd .. && rm -rf openldap-${LDAP_TAG}
COPY .ci/docker-compose-file/openldap/slapd.conf /usr/local/etc/openldap/slapd.conf COPY .ci/docker-compose-file/openldap/slapd.conf /usr/local/etc/openldap/slapd.conf
COPY apps/emqx_ldap/test/data/emqx.io.ldif /usr/local/etc/openldap/schema/emqx.io.ldif COPY apps/emqx_ldap/test/data/emqx.io.ldif /usr/local/etc/openldap/schema/emqx.io.ldif