[英]gitlab-runner on windows in docker fails to run with wrong OSType error
我在启用 Hyper-V 的 Windows 服务器上有一个 gitlab-runner。
With the docker API exposed to the network I'm able to run linux docker containers and even docker itself with docker:latest.
e:\>docker run -ti --rm -e DOCKER_HOST=tcp://10.99.0.12:2375 --name test docker:latest
/ # docker ps
CONTAINER ID ....
xxxxx docker:latest ... Up 10 seconds
/ # docker run -ti --rm busybox uname -a
Linux 42342423 4.14.35 ...
所以这似乎都是正确的。
当我现在想在部署阶段运行docker-compose up -d
时,我会收到来自 gitlab-runner 的错误
Running with gitlab-runner 12.10.0 (c553af1a)
on Staging Runner
Preparing the "docker" executor
ERROR: Removing network for build
ERROR: Job failed: executor requires OSType=linux, but Docker Engine supports only OSType=windows
我也许可以直接在主机上运行 gitlab-runner,而是将所有东西都放在存储库中,只需要安装 docker。
我最近遇到了这个。 You have to go into Docker on your Windows host and select the "Switch to Linux containers..." option.
有关的:
对于遇到同样问题的每个人。
Gitlab 目前不想实现 LCOW,因此 docker-executor 无法实现。
更多信息: https://gitlab.com/gitlab-org/gitlab-runner/-/issues/4373
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.