Gitlab-runner + Docker + Windows - Invalid volume specification

半腔热情 提交于 2019-12-05 20:40:19

问题


I'm trying to run my Gitlab CI locally using Gitlab-runner and docker before committing to make sure they work okay. But I'm having some strange issues!

Unfortunately I have no choice but to use windows (I've had success in the past on Linux).

Every time I run a job in powershell:

C:/Gitlab-runner/gitlab-runner exec docker npm

I get an error:

Job failed (system failure): Error response from daemon: invalid volume specification: '/host_mnt/c/builds/project-0/Users/Lewsmith/api:C:/Users/Lewsmith/api:ro' (executor_docker.go:921:0s)

I've tried setting docker volumes (nemerous combinations) and builds-dir:

C:/Gitlab-runner/gitlab-runner exec docker --builds-dir /builds --docker-privileged --docker-volumes "/builds:C:/Gitlab-runner/builds" npm

That fails with Error response from daemon: invalid mode: /Gitlab-runner/builds because of the colon after the C..

Can anyone point me in the right direction as I'm stumped?

Using gitlab-runner version 11.5.0


回答1:


At the moment there isn't official support for the Docker executor in Windows. A work in progress issue is open at the moment, and it looks like some people have managed to get a windows docker executor working to varying success in that merge request.

This specific comment shows how they've managed to get it setup using a custom built gitlab-runner. I'm unsure how this will work with Services however, so YMMV.



来源:https://stackoverflow.com/questions/53472481/gitlab-runner-docker-windows-invalid-volume-specification

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!