第一步:安装社区版本docker
1、$ sudo apt update
$ sudo apt install apt-transport-https ca-certificates curl software-properties-common
2、在/etc/apt/sources.list.d/docker.list文件中添加下面内容
deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
3、添加秘钥
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
4、安装docker-ce
sudo apt install docker-ce
第二步:编译docker-18.09.7版本
1、apt-get install gcc pkg-config btrfs-tools
2、进入到 $GOPATH/src/github.com/docker/docker 目录下
执行命令 VERSION=18.09.7 DOCKER_GITCOMMIT=1 ./hack/make.sh binary 完成
Package devmapper was not found in the pkg-config search path.
Perhaps you should add the directory containing `devmapper.pc'
to the PKG_CONFIG_PATH environment variable
No package 'devmapper' found
Removing bundles/
---> Making bundle: bin