unbuntu安装docker
来源:互联网 发布:制作mv视频软件 编辑:程序博客网 时间:2024/05/29 19:24
此文翻译自官方文档,英文原文请参考这里
1. 系统依赖
ubuntu需要如下版本的64bit系统
- Yakkety 16.10
- Xenial 16.04 (LTS)
- Trusty 14.04 (LTS)
使用下面的命令查看正在使用的ubuntu版本:
liujinliu@liujinliu-OptiPlex-7010:~$ lsb_release -aNo LSB modules are available.Distributor ID: UbuntuDescription: Ubuntu 16.04.1 LTSRelease: 16.04Codename: xenial
2. 安装一些包依赖
curl
是接下来按照需要使用的,linux-image-extra-*
使得你安装的docker可以使用aufs存储驱动
$ sudo apt-get update$ sudo apt-get install curl \ linux-image-extra-$(uname -r) \ linux-image-extra-virtual
3. 安装docker
1) 安装下面的包使得apt可以使用https的仓库地址
$ sudo apt-get install apt-transport-https \ ca-certificates
2) 导入官方的GPG key
$ curl -fsSL https://yum.dockerproject.org/gpg | sudo apt-key add -
使用下面的命令验证key ID 是 58118E89F3A912897C070ADBF76221572C52609D
$ apt-key fingerprint 58118E89F3A912897C070ADBF76221572C52609Dpub 4096R/2C52609D 2015-07-14 Key fingerprint = 5811 8E89 F3A9 1289 7C07 0ADB F762 2157 2C52 609Duid Docker Release Tool (releasedocker) <docker@docker.com>
使用下面的命令将相应的软件仓库地址导入,如果想使用最新的(非稳定版本)的docker,可以在main后边加个testing,在生产环境是不推荐这样做的。
当然如果加完想去掉的话,直接编辑/etc/apt/sources.list
就可以了,去掉最后的testing就可以了。
3) 安装docker
$ sudo apt-get update$ sudo apt-get -y install docker-engine
上面的命令将安装最新稳定版本的docker,也可以安装某个特定版本的docker,下面的命令看当前都有哪些稳定版本
$ sudo apt-cache madison docker-enginedocker-engine | 1.13.0-0~ubuntu-xenial | https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 Packagesdocker-engine | 1.12.6-0~ubuntu-xenial | https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 Packagesdocker-engine | 1.12.5-0~ubuntu-xenial | https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 Packagesdocker-engine | 1.12.4-0~ubuntu-xenial | https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 Packagesdocker-engine | 1.12.3-0~xenial | https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 Packagesdocker-engine | 1.12.2-0~xenial | https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 Packagesdocker-engine | 1.12.1-0~xenial | https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 Packagesdocker-engine | 1.12.0-0~xenial | https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 Packagesdocker-engine | 1.11.2-0~xenial | https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 Packagesdocker-engine | 1.11.1-0~xenial | https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 Packagesdocker-engine | 1.11.0-0~xenial | https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 Packages
安装特定版本的docker使用下面的命令
sudo apt-get -y install docker-engine=<VERSION_STRING>
下面的命令验证安装是否完成:
$ sudo docker run hello-worldUnable to find image 'hello-world:latest' locallylatest: Pulling from library/hello-world78445dd45222: Pull complete Digest: sha256:c5515758d4c5e1e838e9cd307f6c6a0d620b5e07e6f927b07d05f6d12a1ac8d7Status: Downloaded newer image for hello-world:latestHello from Docker!This message shows that your installation appears to be working correctly.To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal.To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bashShare images, automate workflows, and more with a free Docker ID: https://cloud.docker.com/For more examples and ideas, visit: https://docs.docker.com/engine/userguide/
0 0
- unbuntu安装docker
- Unbuntu安装Docker
- hello world unbuntu下安装docker
- 安装unbuntu
- Unbuntu GTK安装
- unbuntu scim安装方法
- 安装 unbuntu 10.0.4
- ngnix 编译安装 unbuntu
- Unbuntu 安装 juniper
- unbuntu下安装postsql
- unbuntu安装tomcat
- Unbuntu中安装JDK
- Unbuntu上安装Ultardit
- Unbuntu下安装jdk7
- unbuntu安装apache2
- Unbuntu 安装Mac主题
- Unbuntu安装中文输入法
- unbuntu 下安装 openoffice
- #“Machine Learning”(Andrew Ng)#Week 2_2:Normal Equation
- bootstrap 1-导航条和下拉菜单
- 《爱上Processing》教学笔记(六)
- Leetcode 15. 3Sum
- sql 语句调优
- unbuntu安装docker
- 2016年终总结
- GPS与相对论
- C语言中字符串的输入问题
- 一篇文章,读懂9种优先的管理之道
- OOZIE调用SPARK实例
- 【微信开发】-- 企业转账到用户
- 【CTF题】使用文件包含漏洞读取网页代码
- 一种基于机器学习的五子棋实现