Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6660435
  • 博文数量: 1159
  • 博客积分: 12444
  • 博客等级: 上将
  • 技术积分: 12570
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-13 21:34
文章分类

全部博文(1159)

文章存档

2016年(126)

2015年(350)

2014年(56)

2013年(91)

2012年(182)

2011年(193)

2010年(138)

2009年(23)

分类: 网络与安全

2016-01-30 23:00:19


[root@n6 n6.conf]# service docker start
Redirecting to /bin/systemctl start  docker.service
Failed to get D-Bus connection: 不允许的操作

[root@n6 n6.conf]# iptables -L    

[root@n6 n6.conf]# docker daemon
[root@n6 n6.conf]# docker daemon -D &

//Docker daemon supports for several different image layer storage drivers: aufs, devicemapper, btrfs, zfs and overlay
// OK OK OK
[root@n6 n6.conf]# docker daemon -D -s overlay &

[root@n6 n6.conf]#
ping 10.108.162.164
ping
ping 10.0.0.1

[root@n6 n6.conf]# netstat -nr

pkill docker
iptables -t nat -F
ifconfig docker0 down
brctl delbr docker0
sudo service docker start


[root@n6 n6.conf]# docker daemon -D -s overlay -H fd:// &

[root@n6 n6.conf]# ps -ef
[root@n6 n6.conf]# lsof -i -P


[root@n6 n6.conf]# docker run -i -t centos /bin/bash
[root@n6 n6.conf]# docker run -it --dns=10.3.9.4 centos ping -w1
[root@n6 n6.conf]# docker run --dns 10.3.9.4 --dns 10.3.9.5 --dns 10.3.9.6 -i -t centos /bin/bash

[root@n6 n6.conf]# tshark -i eth0 -i docker0
[root@n6 n6.conf]# ip addr


docker network inspect bridge
tcpdump -i docker0 icmp [-v]
iptables -t filter -nvL

[root@n6 n6.conf]# fg

--------------------------------
problem:

[root@n6 n6.conf]# docker info
DEBU[0482] Calling GET /v1.21/info                      
DEBU[0482] GET /v1.21/info                              
Containers: 0
Images: 0
Server Version: 1.9.1-fc23
Storage Driver: overlay
 Backing Filesystem: extfs
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 4.3.3-301.fc23.x86_64
Operating System: Fedora 23 (Twenty Three) (containerized)
CPUs: 4
Total Memory: 7.527 GiB
Name: n6
ID: NGHW:BCHL:KXI7:FFL7:F3WM:T5ZQ:MYXU:IPW5:FJX7:YW5U:4OV2:VYZJ
Debug mode (server): true
 File Descriptors: 11
 Goroutines: 23
 System Time: 2016-01-30T18:01:23.793648708+08:00
 EventsListeners: 0
 Init SHA1: 3fd06f588b90413408e5a41309d802ca71feeea6
 Init Path: /usr/libexec/docker/dockerinit
 Docker Root Dir: /var/lib/docker
WARNING: No swap limit support
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
[root@n6 n6.conf]#

resolve:
[root@localhost core]# iptables -F
[root@localhost core]# ip6tables -F

--------------------------------
problem:
[root@localhost ~]# systemctl restart docker
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
[root@localhost ~]# docker daemon
WARN[0000] Usage of loopback devices is strongly discouraged for production use. Please use `--storage-opt dm.thinpooldev` or use `man docker` to refer to dm.thinpooldev section.
FATA[0000] Error starting daemon: error initializing graphdriver: "/var/lib/docker" contains other graphdrivers: overlay; Please cleanup or explicitly choose storage driver (-s )

resolve:
# rm /var/lib/docker/overlay/ -rf

--------------------------------
Docker not starting “ could not delete the default bridge network: network bridge has active endpoints”"

Run
sudo mv /var/lib/docker/network/files/ /tmp/dn-bak

to reset your networks. Then restart docker (sudo systemctl restart docker or sudo service docker restart depending on your OS). If everything works again you can delete the dn-bak directory.

--------------------------------

[root@localhost ~]# gedit /etc/sysconfig/docker
DOCKER_OPTS="--dns 8.8.8.8 --dns 75.75.75.76"
DOCKER_OPTS="--iptables=true --dns=10.20.100.1 --dns=8.8.8.8"

--------------------------------

On arch linux I needed
ip link set down docker0 instead of ifconfig docker0 down and
systemctl restart docker instead of service docker start.
To delete all images, I did
docker rmi $(docker images -q)

++++++++++++++++
docker tag c8a648134623 docker.io/centos:core

/etc/sysconfig/docker-storage这个配置文件
DOCKER_STORAGE_OPTIONS="--storage-opt dm.no_warn_on_loop_devices=true"
or
DOCKER_STORAGE_OPTIONS="-s overlay"


------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------
Description of problem:

`docker version`:

`docker info`:

`uname -a`:

Environment details (AWS, VirtualBox, physical, etc.):

How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual Results:

Expected Results:

Additional info:
------------------------------------------------------------------------------------------------------
阅读(1697) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~