GitLab CI Runner, how to use volumes or mounts in service containers
I use GitLab CI Runner, it uses the command:
docker run -d –name postgres postgres:9.4
I want to do something like this:
docker run -d –name postgres –volumes-from postgres_datastore postgres:9.4
But GitLab CI Runner doesn’t support any options (-v or –volumes-from).
Is there any other way?
volumes-from option is not yet available in Gitlab CI Runner (see this PR), however you can configure host mounts and volumes:
[runners.docker] volumes = ["/host/path:/target/path:rw", "/some/path"]
The above example would mount
/target/path/ inside the container and also create a new volume container at
See the Gitlab CI Runner manual for all docker related options.
For service containers it seems you can only define volumes via the dockerfile of the service image. Maybe enough depending on your requirements.
- Database Administration Tutorials
- Programming Tutorials & IT News
- Linux & DevOps World
- Ebook Reviews
- PES Matches, Skills & News