docker代码编译客户端通过服务器不行,需要安装什么依赖吗


客户端目录:src/github.com/docker/docker/cmd/docker
在这里编译客户端可以通过。
服务器端目录:src/github.com/docker/docker/cmd/dockerd
结果:
$ go build

github.com/docker/docker/daemon/graphdriver/btrfs

../../daemon/graphdriver/btrfs/btrfs.go:8:25: fatal error: btrfs/ioctl.h: No such file or directory
#include <btrfs/ioctl.h>
^
compilation terminated.

github.com/docker/docker/pkg/devicemapper

../../pkg/devicemapper/devmapper_wrapper.go:7:26: fatal error: libdevmapper.h: No such file or directory
#include <libdevmapper.h>
^
compilation terminated.
$ pwd
/home/baizhi/gopjk/src/github.com/docker/docker/cmd/dockerd
已邀请:

baizhi - golang后端开发

赞同来自:


$ sudo dockerd
password for baizhi:
INFO libcontainerd: new containerd process, pid: 20002
WARN containerd: low RLIMIT_NOFILE changing to max current=1024 max=4096
WARN devmapper: Usage of loopback devices is strongly discouraged for production use. Please use --storage-opt dm.thinpooldev or use man docker to refer to dm.thinpooldev section.
WARN devmapper: Base device already exists and has filesystem xfs on it. User specified filesystem will be ignored.
INFO using prior storage driver &amp;amp;amp;amp;amp;amp;amp;quot;devicemapper&amp;amp;amp;amp;amp;amp;amp;quot;
INFO Graph migration to content-addressability took 0.00 seconds
INFO Loading containers: start.

INFO Firewalld running: true

INFO Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address

INFO Loading containers: done.

INFO Daemon has completed initialization

INFO Docker daemon commit=6b644ec graphdriver=devicemapper version=1.12.3
INFO API listen on /var/run/docker.sock

ERRO Handler for GET /v1.25/containers/json returned error: client is newer than server (client API version: 1.25, server API version: 1.24)

能不能本地编译dockerd命令,就像上面那样,启动后看到客户端请求的日志,最后一条的ERRO 是用go build编译出来的docker客户端发送的一个命令。比自己安装的docker版本高。

要回复问题请先登录注册