念念不忘,必有迴響

Linux下Docker的二进制安装

  首先,为什么不直接用curl的方式直接在线下载安装docker(又开玩笑了,文件在国外的服务器上,我们这边网速不太好。。。)
  以下在homstead的Ubuntu18.04下实现。

步骤

下载二进制包

https://download.docker.com/linux/static/stable/x86_64/

提取出二进制文件

tar xzvf docker-18.03.1-ce.tgz

copy 二进制文件到相应目录

sudo cp docker/* /usr/bin/

启动 dockerd (这个命令不加好像不能启动docker.server)

sudo dockerd &

查看docker 版本信息(root运行!!!,Client&Server都有输出就OK!)

sudo docker version

root@DexterHo:~# sudo docker version
Client: Docker Engine - Community
 Version:           18.09.0
 API version:       1.39
 Go version:        go1.10.4
 Git commit:        4d60db4
 Built:             Wed Nov  7 00:46:51 2018
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.0
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.4
  Git commit:       4d60db4
  Built:            Wed Nov  7 00:52:55 2018
  OS/Arch:          linux/amd64
  Experimental:     false

安装docker-compose

https://get.daocloud.io/ 获取下载地址 (打不开请重新刷新)

curl -L https://get.daocloud.io/docker/compose/releases/download/1.23.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

到此,就愉快的安装好docker跟docker-compose了!

-- END

写的不错,赞助一下主机费

扫一扫,用支付宝赞赏
扫一扫,用微信赞赏

暂无评论~~