简体   繁体   English

找到pidfile的位置 windows的docker | docker.pid

[英]Where is locate pidfile | docker for windows | docker.pid

I would like to have docker inside docker for use CI-agent. 我想在docker中使用docker来使用CI-agent。 But for it I need to share docker.pid file inside docker container and I can't find that file in this path C:\\ProgramData\\docker.pid and even I try to add this in docker daemon config: 但对于它我需要在docker.pid容器内共享docker.pid文件,我在这个路径C:\\ProgramData\\docker.pid找不到该文件,甚至我尝试在C:\\ProgramData\\docker.pid守护进程配置中添加它:

{
...
  "pidfile": "C:\\docker.pid",
...
}

And after a restart, that file didn't appear. 重启后,该文件没有出现。 Could you please help me? 请你帮助我好吗?

Also tried different variant in config file like "C:\\docker.pid" , "C:/docker.pid" . 还在配置文件中尝试了不同的变体,如"C:\\docker.pid""C:/docker.pid" The same behavior. 同样的行为。 The docker logs is clean about creating or removing docker.pid file. docker.pid日志对于创建或删除docker.pid文件很干净。

Software info 软件信息

Windows Version: 10 1809 build 17763 Windows版本:10 1809 build 17763

Docker for Windows Version: 2.0.0.2 31259 Docker for Windows版本:2.0.0.2 31259

Expected behavior 预期的行为

Create pid file in path C:\\docker.pid 在路径C:\\docker.pid创建pid文件

Actual behavior 实际行为

The file is absent 该文件不存在


Also created an issue in github https://github.com/docker/for-win/issues/3741 还在github https://github.com/docker/for-win/issues/3741中创建了一个问题

I found a way to run Docker inside docker. 我找到了一种在Docker中运行Docker的方法。 These two topics help me: 这两个主题帮助我:

https://forums.docker.com/t/solved-using-docker-inside-another-container/12222/3 https://forums.docker.com/t/solved-using-docker-inside-another-container/12222/3

Bind to docker socket on Windows 绑定到Windows上的docker socket

I needed docker.sock file and it locate //var/run/docker.sock so 我需要docker.sock文件,它找到了//var/run/docker.sock

-v //var/run/docker.sock:/var/run/docker.sock

resolve my problem. 解决我的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM