Proper way of automatically adding indexes docker service with Gitlab CI

I’m having trouble with finding a proper way migrating a mongo service. I could either build a custom image with baked in indexes or install docker in main image and add those indexes during startup.

I think that both ways are kinda sketchy. The first is good because it will work, but i think that such things like adding necessary indexes should be in Makefile.

  • How can I find which container(s) have mounted a specific volume?
  • Consul for Docker container discovery: how to get latest container in Consul-Template?
  • what is the difference between --force-rm and --rm when running docker build command
  • cannot create JDBC datasource named transactional_DS while implementing Multi-instance in moqui using docker
  • How to read all data inside volume from kubernetes master
  • Why does my automated build run so slowly inside a Docker container?
  • The second second one is sketchy because Docker image should be as light as possible.

    Is there a way to call commands in service containers from Gitlab CI file?

  • Pass docker-compose environment to symfony configuration
  • How to automate Grunt on a Docker image
  • multiple docker clients on the same machine
  • run mysql:5.5 docker image from ansible
  • chrome fails with “Illegal instruction” in minimal Centos7+Xvfb
  • i/o timeout error using progrium/docker-consul
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.