Add volumes-from options for docker build containers
When using Docker for the build executor, it would be useful to be able to specify a data container for the build container, just as we are able to specify a config data container for the runner containers (especially if we could specify this when registering the runner with the CI). The shell executor is fine for things like dependency management caching, but since each build is a new container the Docker executor doesn't really do this very well.
This would be set in the runners configuration file config.toml
similar to volumes, and can also be asked interactively with the register
command (though not necessary):
[[runners]]
...
[runners.docker]
...
volumes = [ ... ]
volumes-from = [ "name-of-data-container" ]
Please enter the executor: shell, parallels, docker, docker-ssh, ssh:
[shell]: docker
Please enter the Docker image (eg. ruby:2.1):
ruby:2.1
Please enter the name of the data container, if any, to use volumes from:
name-of-data-container
I've made an attempt at this in a fork (zanderbaldwin/gitlab-ci-multi-runner@5389ca5a) but I don't know Go, I haven't set up my environment properly to build this let alone test it, and I don't even know if what I wrote is even valid. But at least I tried
If I'm going about this wrong then let me know, I probably just didn't read the docs well enough.