Docker:Docker的安装
1. 由于老版本的docker支持的命令很少,因而需要卸載老版本的docker。
(http://blog.csdn.net/yangzhenping/article/details/43671843)
sudo docker -v sudo apt-get remove docker老版本的docker支持的命令:
?
2. 在ubuntu14上面重新安裝新版本的docker
(http://blog.csdn.net/xundh/article/details/46441403)
直接使用如下命令即可
wget -qO- https://get.docker.com/ | shq后面是大寫字母O
說明:有時候賦值上面這句話,就是提示有問題,去上面的網址復制,就可以執行。。。
3. 在ubuntu16上面重新安裝新版本的docker
參考docker官方文檔(https://docs.docker.com/engine/installation/linux/ubuntulinux/)
說明:a. 上面網址有16.04,15.10,14.04,12.04的安裝步驟。接下來只說在ubuntu16上怎么安裝。
b. ubuntu內核最低為3.10.使用如下命令查看內核版本:
uname -r1)更新apt源:
① ensure that APT works with the https method, and that CA certificates are installed
終端中輸入如下命令:
sudo apt-get update sudo apt-get install apt-transport-https ca-certificates② 增加新的GPG key
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D③ 打開/etc/apt/sources.list.d/docker.list文件,刪除里面的所有內容(需要超級管理員權限);如果不存在,創建。
④ 在③中的文件中增加 entry,并保存該文件:
deb https://apt.dockerproject.org/repo ubuntu-xenial main注意:其他版本中的請查看上面的網址。Docker does not provide packages for all architectures. You can find nightly built binaries in https://master.dockerproject.org. To install docker on a multi-architecture system, add an [arch=...] clause to the entry. Refer to the Debian Multiarch wiki for details.
說明:之前安裝docker時,只能安裝到1.10,后來打開該文件,發現源不對。更改了之后,后面安裝的就是最新的了。
⑤ 更新apt
sudo apt-get update⑥ 如果有的話,清除老的repo
sudo apt-get purge lxc-docker⑦ Verify that APT is pulling from the right repository.
apt-cache policy docker-engine2)安裝docker
① 終端中輸入:
sudo apt-get update② 安裝docker:
sudo apt-get install docker-engine③ Start the docker daemon:
sudo service docker start④ 驗證docker成功安裝:
sudo docker run hello-world結果如下:
可選的配置:見參考網址。
?
4. 新版本的docker:
新版本docker支持的命令:
總結
以上是生活随笔為你收集整理的Docker:Docker的安装的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: LINUX:段错误
- 下一篇: 操作系统:进程调度算法