[英]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.