Docker ubuntu14.04安装

参考文档
https://docs.docker.com/engine/installation/linux/ubuntulinux/

Update your apt sources
Docker’s APT repository contains Docker 1.7.1 and higher. To set APT to use packages from the new repository:
If you haven’t already done so, log into your Ubuntu instance as a privileged user.
Open a terminal window.
Update package information, ensure that APT works with the https method, and that CA certificates are installed.

$ apt-get update

$ apt-get install apt-transport-https ca-certificates

Add the new GPG key.

$ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

Open the /etc/apt/sources.list.d/docker.listfile in your favorite editor.
If the file doesn’t exist, create it.

Remove any existing entries.
Add an entry for your Ubuntu operating system.
The possible entries are:

On Ubuntu Precise 12.04 (LTS)

deb https://apt.dockerproject.org/repo ubuntu-precise main

On Ubuntu Trusty 14.04 (LTS)

deb https://apt.dockerproject.org/repo ubuntu-trusty main

Ubuntu Wily 15.10

deb https://apt.dockerproject.org/repo ubuntu-wily main

Note: Docker does not provide packages for all architectures. To install docker on a multi-architecture system, add an [arch=…] clause to the entry. Refer to the Debian Multiarch wiki for details.
Save and close the /etc/apt/sources.list.d/docker.list file.
Update the APT package index.

$ apt-get update

Purge the old repo if it exists.

$ apt-get purge lxc-docker

Verify that APT is pulling from the right repository.

$ apt-cache policy docker-engine

From now on when you run apt-get upgrade, APT pulls from the new repository.
Prerequisites by Ubuntu Version
Ubuntu Wily 15.10
Ubuntu Trusty 14.04 (LTS)
For Ubuntu Trusty and Wily, it’s recommended to install the linux-image-extra kernel package. The linux-image-extra package allows you use the aufs storage driver.
To install the linux-image-extra package for your kernel version:
Open a terminal on your Ubuntu host.
Update your package manager.

$ sudo apt-get update

Install the recommended package.

$ sudo apt-get install linux-image-extra-$(uname -r)

Go ahead and install Docker.
If you are installing on Ubuntu 14.04 or 12.04, apparmor is required. You can install it using: apt-get install apparmor

Install
Make sure you have installed the prerequisites for your Ubuntu version.
Then, install Docker using the following:
Log into your Ubuntu installation as a user with sudo privileges.
Update your APT package index.

$ sudo apt-get update

Install Docker.

$ sudo apt-get install docker-engine

Start the docker daemon.

$ sudo service docker start

Verify docker is installed correctly.

$ sudo docker run hello-world

This command downloads a test image and runs it in a container. When the container runs, it prints an informational message. Then, it exits.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值