我正在使用franela/dind
图像来获得 bash:
docker run --rm --privileged -it franela/dind bash
*确保/etc/docker/daemon.json
在运行前删除dockerd
。
在里面我跑了dockerd
,它开始打印很多日志:
WARN[2019-02-24T13:40:16.902536038Z] could not change group /var/run/docker.sock to docker: group docker not found
INFO[2019-02-24T13:40:16.922239343Z] libcontainerd: started new docker-containerd process pid=880
INFO[2019-02-24T13:40:16.922290278Z] parsed scheme: "unix" module=grpc
INFO[2019-02-24T13:40:16.922302876Z] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2019-02-24T13:40:16.922360290Z] ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/docker-containerd.sock 0 <nil>}] module=grpc
INFO[2019-02-24T13:40:16.922373417Z] ClientConn switching balancer to "pick_first" module=grpc
INFO[2019-02-24T13:40:16.922423556Z] pickfirstBalancer: HandleSubConnStateChange: 0xc4203c96e0, CONNECTING module=grpc
INFO[0000] starting containerd revision=468a545b9edcd5932818eb9de8e72413e616e86e version=v1.1.2
INFO[0000] loading plugin "io.containerd.content.v1.content"... type=io.containerd.content.v1
INFO[0000] loading plugin "io.containerd.snapshotter.v1.btrfs"... type=io.containerd.snapshotter.v1
我试图在没有日志的情况下运行它,但我尝试的一切都没有帮助:
# run as a background process
dockerd &
# redirect the output to /dev/null
dockerd > /dev/null
# try to remove the logs with the --log-level switch
dockerd --log-level error
dockerd
在没有所有这些日志的情况下如何运行服务?让它处于相当模式。