docker官网有最新的安装教程 http://docs.docker.com/linux/step_one/ 。
Linux版本不同,也可有其他的安装方法,并且都是从docker官方镜像站,下载安装最新软件。下面是我的安装过程
1.安装docker
curl -s https://get.docker.io/ubuntu/
提示 The program 'curl' is currently not installed. To run 'curl' please ask your administrator to install the package 'curl'
要安装curl
apt-get install curl
然后
root@data-server:/home# curl -s https://get.docker.io/ubuntu/
# Check that HTTPS transport is available to APT
if [ ! -e /usr/lib/apt/methods/https ]; then
apt-get update
apt-get install -y apt-transport-https
fi
# Add the repository to your APT sources
echo deb https://get.docker.com/ubuntu docker main > /etc/apt/sources.list.d/docker.list
# Then import the repository key
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# Install docker
apt-get update
apt-get install -y lxc-docker
#
# Alternatively, just use the curl-able install.sh script provided at https://get.docker.com
#
此时你可以看到详细的安装过程,然后按步骤一步步安装就OK了。。。。。
2. 下载一个Ubuntu镜像
docker pull ubuntu
然后
docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
ubuntu latest d2a0ecffe6fa 11 days ago 188.4 MB
就看到下载的镜像了