Gitlab CI 准备环境:来自守护进程的错误响应:hcssshim::CreateComputeSystem
我创建了一个 Windows 映像,并将其推送到自定义注册表。 图像构建没有任何错误。它也可以在任何使用命令 docker run 的机器上完美运行。
我在 Windows 主机上使用配置为使用 docker-windows 的 gitlab 运行程序。 当在 shell 中使用命令 docker run 时,该镜像在 Windows 主机上也运行得非常好。
但是,当 gitlab CI 触发管道时,我收到以下包含错误的日志:
Running with gitlab-runner 14.9.0 (d1f69508)
on Test windows docker runner daSVobYW
Preparing the "docker-windows" executor 00:01
Using Docker executor with image someaddress:someport/windows_msvc2019_qt-desktop-6.2.3:v1.0.0 ...
Pulling docker image someaddress:someport/windows_msvc2019_qt-desktop-6.2.3:v1.0.0 ...
Using docker image sha256:XXX for someaddress:someport/windows_msvc2019_qt-desktop-6.2.3:v1.0.0 with digest someaddress:someport/windows_msvc2019_qt-desktop-6.2.3@sha256:XXX ...
Preparing environment
ERROR: Job failed (system failure): prepare environment: Error response from daemon: hcsshim::CreateComputeSystem 2f20866e4110118edc3274945d93d6138a16a67f9865d325e8b81c572ce08b96: Access denied. (exec.go:73:0s). Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information
我查看了指向的网页,但没有找到我的问题的任何好的答案。 有什么想法吗?
这是我的 docker info 输出:
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc., v0.8.1)
compose: Docker Compose (Docker Inc., v2.3.3)
scan: Docker Scan (Docker Inc., v0.17.0)
Server:
Containers: 15
Running: 0
Paused: 0
Stopped: 15
Images: 5
Server Version: 20.10.13
Storage Driver: windowsfilter (windows) lcow (linux)
Windows:
LCOW:
Logging Driver: json-file
Plugins:
Volume: local
Network: ics internal l2bridge l2tunnel nat null overlay private transparent
Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog
Swarm: inactive
Default Isolation: hyperv
Kernel Version: 10.0 19044 (19041.1.amd64fre.vb_release.191206-1406)
Operating System: Windows 10 Pro Version 2009 (OS Build 19044.1586)
OSType: windows
Architecture: x86_64
CPUs: 4
Total Memory: 15.9GiB
Name: RUNNERNAME
ID: 35KO:UJAL:TZQ6:KA57:7Q3I:QTLO:YCTI:AR2Y:TIDC:K4UL:VYJ5:BPWR
Docker Root Dir: C:\ProgramData\Docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries: someaddress:someport
Live Restore Enabled: false
Product License: Community Engine
以及 gitlab runner 配置文件的内容:
concurrent = 1
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
url = "someurl"
token = "sometoken"
executor = "docker-windows"
[runners.custom_build_dir]
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
[runners.cache.azure]
[runners.docker]
tls_verify = false
image = "someaddress:someport/windows_msvc2019_qt-desktop-6.2.3"
privileged = false
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = false
volumes = ["c:\\cache"]
shm_size = 0
I have created a windows image that I pushed to a custom registry.
The image builds without any error. It also runs perfectly fine on any machine using the command docker run
.
I use a gitlab runner configured to use docker-windows, on a windows host.
The image also runs perfectly fine on the windows host when using the command docker run
in a shell.
However, when gitlab CI triggers the pipeline, I get the following log containing an error :
Running with gitlab-runner 14.9.0 (d1f69508)
on Test windows docker runner daSVobYW
Preparing the "docker-windows" executor 00:01
Using Docker executor with image someaddress:someport/windows_msvc2019_qt-desktop-6.2.3:v1.0.0 ...
Pulling docker image someaddress:someport/windows_msvc2019_qt-desktop-6.2.3:v1.0.0 ...
Using docker image sha256:XXX for someaddress:someport/windows_msvc2019_qt-desktop-6.2.3:v1.0.0 with digest someaddress:someport/windows_msvc2019_qt-desktop-6.2.3@sha256:XXX ...
Preparing environment
ERROR: Job failed (system failure): prepare environment: Error response from daemon: hcsshim::CreateComputeSystem 2f20866e4110118edc3274945d93d6138a16a67f9865d325e8b81c572ce08b96: Access denied. (exec.go:73:0s). Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information
I looked a the pointed web page but didn't find any good answer to my issue.
Any idea ?
Here is my docker info output:
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc., v0.8.1)
compose: Docker Compose (Docker Inc., v2.3.3)
scan: Docker Scan (Docker Inc., v0.17.0)
Server:
Containers: 15
Running: 0
Paused: 0
Stopped: 15
Images: 5
Server Version: 20.10.13
Storage Driver: windowsfilter (windows) lcow (linux)
Windows:
LCOW:
Logging Driver: json-file
Plugins:
Volume: local
Network: ics internal l2bridge l2tunnel nat null overlay private transparent
Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog
Swarm: inactive
Default Isolation: hyperv
Kernel Version: 10.0 19044 (19041.1.amd64fre.vb_release.191206-1406)
Operating System: Windows 10 Pro Version 2009 (OS Build 19044.1586)
OSType: windows
Architecture: x86_64
CPUs: 4
Total Memory: 15.9GiB
Name: RUNNERNAME
ID: 35KO:UJAL:TZQ6:KA57:7Q3I:QTLO:YCTI:AR2Y:TIDC:K4UL:VYJ5:BPWR
Docker Root Dir: C:\ProgramData\Docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries: someaddress:someport
Live Restore Enabled: false
Product License: Community Engine
and the content of gitlab runner config file :
concurrent = 1
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
url = "someurl"
token = "sometoken"
executor = "docker-windows"
[runners.custom_build_dir]
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
[runners.cache.azure]
[runners.docker]
tls_verify = false
image = "someaddress:someport/windows_msvc2019_qt-desktop-6.2.3"
privileged = false
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = false
volumes = ["c:\\cache"]
shm_size = 0
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我使用 Docker 4.6.0 及以上版本也遇到同样的问题。
尝试从这里安装 docker 4.5.1 https://docs.docker.com/ desktop/windows/release-notes/ 并让我知道这是否适合您。
I have the same problem using Docker version 4.6.0 and above.
Try to install docker 4.5.1 from here https://docs.docker.com/desktop/windows/release-notes/ and let me know if this works for you.