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 |
修改了一下, https://get.docker.io/ubuntu 这个链接有 301 跳转了...
执行有问题吧?
localhost:~/ocserv-docker$ docker run -d --privileged -v ~/ocserv-docker/ocserv:/etc/ocserv -p 443:443/tcp
docker: "run" requires a minimum of 1 argument.
See 'docker run --help'.
Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
Run a command in a new container
是我自己的命令没敲完。。。
@googya
docker run -d --privileged -v ~/ocserv-docker/ocserv:/etc/ocserv -p 443:443/tcp wppurking/ocserv
仔细看一下 README.md
现在换到get.docker.io了
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
获取的源已经不行了,docker安装不上