Run blocking script before user docker containers



is there a way to execute a script on boot that

  • runs before user docker services
  • is blocking
  • can use “docker run” commands?

Background: I’d like to execute a script that clones or pulls a git repository to RancherOS, so my user docker services can use the content of that repository. The git executable itself is wraped in a docker container. Do you know a better way to connect your user docker service config files to Github?