Last active
July 23, 2016 13:43
-
-
Save wppurking/55db8651a88425e0f977 to your computer and use it in GitHub Desktop.
Ubuntu 上安装 Docker 1.x
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# refs https://docs.docker.com/v1.8/linux/step_one/ | |
# oneline: | |
# wget -qO- https://get.docker.com/ | sh | |
require 'sshkit' | |
require 'sshkit/dsl' | |
# 例如 H=root@wyatt.domain.com; 记得需要 ssh 免密码登陆 | |
SERVER = ENV.delete('H') | |
on(SERVER) do |host| | |
execute('wget -qO- https://get.docker.io/gpg | apt-key add -') # 获取 docker apt 源的 gpg | |
execute('echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list') # 添加 docker 的 ubuntu 源 | |
execute('apt-get update') # 更新 ubuntu 源 | |
execute('apt-get install vim curl htop lxc-docker -y') # apt 安装需要的软件 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
现在换到get.docker.io了