1
2
|
SELINUX=disabled
SELINUXTYPE=targeted
|
1
|
sudo
yum
install
http:
//ftp
.riken.jp
/Linux/fedora/epel/6/x86_64/epel-release-6-8
.noarch.rpm
|
1
2
|
cd
/etc/yum
.repos.d
sudo
wget http:
//www
.hop5.
in
/yum/el6/hop5
.repo
|
1
|
sudo
yum
install
docker-io
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# docker -h
Usage of docker:
-D=
false
: Enable debug mode
-H=[]: Multiple tcp:
//host
:port or unix:
//path/to/socket
to bind
in
daemon mode, single connection otherwise
-api-
enable
-cors=
false
: Enable CORS headers
in
the remote API
-b=
""
: Attach containers to a pre-existing network bridge; use
'none'
to disable container networking
-bip=
""
: Use this CIDR notation address
for
the network bridge's IP, not compatible with -b
-d=
false
: Enable daemon mode
-dns=[]: Force docker to use specific DNS servers
-g=
"/var/lib/docker"
: Path to use as the root of the docker runtime
-icc=
true
: Enable inter-container communication
-ip=
"0.0.0.0"
: Default IP address to use when binding container ports
-iptables=
true
: Disable docker's addition of iptables rules
-p=
"/var/run/docker.pid"
: Path to use
for
daemon PID
file
-r=
true
: Restart previously running containers
-s=
""
: Force the docker runtime to use a specific storage driver
-
v
=
false
: Print version information and quit
|
1
2
|
sudo
service cgconfig stop
# 关闭服务
sudo
chkconfig cgconfig off
# 取消开机启动
|
1
|
mount
-t cgroup none
/cgroup
# 仅本次有效
|
1
|
none
/cgroup
cgroup defaults 0 0
# 开机后自动挂载,一直有效
|
1
2
|
sudo
service docker start
# 启动服务
sudo
chkconfig docker on
# 开机启动
|
1
|
sudo
docker run -i -t ubuntu
/bin/echo
hello world
|