Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ubuntu 上安装 Docker 1.x
# 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
@wzc0x0

This comment has been minimized.

Copy link

@wzc0x0 wzc0x0 commented Jul 11, 2015

获取的源已经不行了,docker安装不上

@wzc0x0

This comment has been minimized.

@wppurking

This comment has been minimized.

Copy link
Owner Author

@wppurking wppurking commented Aug 4, 2015

修改了一下, https://get.docker.io/ubuntu 这个链接有 301 跳转了...

@googya

This comment has been minimized.

Copy link

@googya googya commented Aug 6, 2015

执行有问题吧?

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

是我自己的命令没敲完。。。

@wppurking

This comment has been minimized.

Copy link
Owner Author

@wppurking wppurking commented Nov 8, 2015

@googya
docker run -d --privileged -v ~/ocserv-docker/ocserv:/etc/ocserv -p 443:443/tcp wppurking/ocserv 仔细看一下 README.md

@fisherwise

This comment has been minimized.

Copy link

@fisherwise fisherwise commented Feb 21, 2016

现在换到get.docker.io了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment