title: Create indexes on initdb script
body: <p>I have a custom docker image from mongo:4.2-6-bionic with two initdb scripts:</p>
  
  <ul>
  <li>/docker-entrypoint-initdb.d/1-database-seed.sh</li>
  <li>/docker-entrypoint-initdb.d/2-create-indexes.sh</li>
  </ul>
  
  <p>When the image is created, the 1-database-seed.sh file is executed correctly. But, 2-create-indexes.sh is not executed.</p>
  
  <p>If i execute manually 2-create-indexes.sh, inside the container, the script runs correctly. The script content is:</p>
  
  <pre><code>#!/bin/bash
  
  mongo renaper --eval "db.names_indexed.createIndex({'fullname': 1})";
  mongo renaper --eval "db.names_indexed.createIndex({'year': 1})";
  mongo renaper --eval "db.names_indexed.createIndex({'fullname': 1,'year': 1})";
  mongo renaper --eval "db.names_indexed.createIndex({'fullname': 'text'})";
  </code></pre>
  
  <p>Any ideas ?</p>