在Ubuntu 14.04上,docker.io
軟件包安裝了Docker 0.9.1。
按照documentation,安裝最新版本使用以下命令:
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
$ sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
$ sudo apt-get update
$ sudo apt-get install lxc-docker
酒店還設有一個簡單的腳本來幫助這個過程:
$ curl -s https://get.docker.io/ubuntu/ | sudo sh
另外,檢查azure-docker-registry項目,瞭解如何自動化Azure配置和Docker容器部署的示例。例如,這Ansible playbook:
- name: create docker data directory
file: path=/mnt/data/docker state=directory
- name: store docker files in data disk
file: src=/mnt/data/docker dest=/var/lib/docker state=link
- name: add repository key
command: creates=/etc/apt/sources.list.d/docker.list apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
- name: copy repository source file
copy: src=docker.list dest=/etc/apt/sources.list.d/docker.list
- name: install docker package
apt: name=lxc-docker update_cache=yes state=present
感謝服務安裝它的啓動和運行,但現在我得到了一個錯誤:'撥UNIX /var/run/docker.sock:許可denied' – lkoenigsberger
好吧,我認爲這是不相關的配置! https://開頭github上。com/dotcloud/docker/issues/5314 – lkoenigsberger
OK'usermod -a -G docker {{your_user}}'現在修復了它 – lkoenigsberger