To import ldif file into docker-compose

I am new on docker, I just created an ldap directory and I can add my users in my directory with this command:

ldapadd -v -h ldap -c -D “cn=admin,dc=ausyldap,dc=fr” -w password -f /ldif/users

Now I just put the openldap in docker-compose which works rather well, I want to automate the import of ldif in docker-composes, but it does not work, the script does not matter at all my users. can anyone help me please.

here is my openldap container for importing the ldif file:

image: osixia/openldap:1.1.9
- ./openldap/ldif:/ldif
- openldap
entrypoint: sh -c “/ldif/”