docker官網有最新的安裝教程 http://docs.docker.com/linux/step_one/ 。linux
Linux版本不一樣,也可有其餘的安裝方法,而且都是從docker官方鏡像站,下載安裝最新軟件。下面是個人安裝過程docker
1.安裝dockershell
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'ubuntu
要安裝curlcurl
apt-get install curl
而後ide
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了。。。。。url
2. 下載一個Ubuntu鏡像
spa
docker pull ubuntu
而後.net
docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE ubuntu latest d2a0ecffe6fa 11 days ago 188.4 MB
就看到下載的鏡像了code