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.

  • Docker container cannot connect to host machine: No route to host
  • How to create named and latest tag in Docker?
  • Configure Postgres application users with Terraform for RDS
  • while running a kubernetes application
  • Issue to node-sass and Docker
  • Docker read Host Env Variable
  • 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?

  • Terminal with Docker Compose with Links
  • Error while running docker container
  • Authentication is required error during automated build in docker hub
  • Dockerfile for Yesod deployment
  • Docker Cloud autotest cant find service
  • Couldn't find Docker Tool Window IntelliJ IDEA 2016.2.4 (Ultimate)
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.