Gitlab-runner + Docker + Windows-无效的卷规格 [英] Gitlab-runner + Docker + Windows - Invalid volume specification

查看:173
本文介绍了Gitlab-runner + Docker + Windows-无效的卷规格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Gitlab-runner和docker在本地运行Gitlab CI,然后再承诺确保它们可以正常运行。但是我遇到了一些奇怪的问题!



不幸的是,我别无选择,只能使用Windows(过去在Linux上取得了成功)。



每次我在Powershell中运行一项工作



C:/ Gitlab-runner / gitlab-亚军高管docker npm



我遇到错误:



作业失败(系统故障):来自守护程序的错误响应:无效的卷规范:'/ host_mnt / c / builds / project-0 / Users / Lewsmith / api:C:/ Users / Lewsmith / api:ro'(executor_docker。 go:921:0s)



我尝试设置docker卷(各种组合)和builds-dir:



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



守护程序的错误响应失败:无效模式:/ Gitlab-

有人能指出我正确的方向吗?被我绊倒了吗?



使用gitlab-runner版本11.5.0

解决方案

在目前,Windows中尚无官方支持Docker执行器。正在进行的问题处于打开状态,并且看起来就像有些人设法使Windows docker执行器在该合并请求中取得了不同的成功。



特定评论显示了他们如何设法使用定制的gitlab-runner 。我不确定这如何与服务一起使用,所以YMMV。


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

解决方案

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.

这篇关于Gitlab-runner + Docker + Windows-无效的卷规格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆