(OK) CentOS7/Fedora23——Installing Docker——core—pip
# rpm -ivh ftp://ftp.muug.mb.ca/mirror/centos/7.2.1511/os/x86_64/Packages/PyYAML-3.10-11.el7.x86_64.rpm
# yum -y install docker docker-registry OR # yum -y install docker-engine docker-registry
# rpm -qa | grep docker
docker-engine-selinux-1.9.1-1.el7.centos.noarch
docker-registry-0.9.1-7.el7.x86_64
docker-engine-1.9.1-1.el7.centos.x86_64
# rm /etc/docker/key.json
# systemctl daemon-reload
# systemctl start docker.service
# systemctl enable docker.service
# systemctl disable docker.service
# docker version
# docker search centos
# docker pull centos
# docker run -i -t centos /bin/bash
--------------------------------
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 <DRIVER>)
resolve:
# rm /var/lib/docker/overlay/ -rf
--------------------------------
----------------------------------------------
uninstall docker:
----------------------------------------------
systemctl stop docker
systemctl disable docker
systemctl daemon-reload
yum -y remove docker*
rm -rf /etc/docker /var/lib/docker /var/run/docker
----------------------------------------------
core—pip —— refer to /opt/tools/network_simulators/core/core/daemon/core/service.py
----------------------------------------------
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python get-pip.py
pip --help
pip -V
++++++++++++++++++++++++++++++++++++++++++++
# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
docker.io/centos latest 60e65a8e4030 4 weeks ago 196.6 MB
# docker tag c8a648134623 docker.io/centos:core
# ls /var/lib/docker/
containers devicemapper graph linkgraph.db network repositories-devicemapper tmp trust volumes
# cat /var/lib/docker/repositories-devicemapper
{"Repositories":{"docker.io/centos":{"latest":"60e65a8e4030022260a4f84166814b2683e1cdfc9725a9c262e90ba9c5ae2332"},"hello-world":{"latest":"0a6ba66e537a53a5ea94f7c6a99c534c6adb12e3ed09326d4bf3b38f7c3ba4e7"}},"ConfirmDefPush":true}
++++++++++++++++++++++++++++++++++++++++++++
Where are docker images stored on the host machine?
++++++++++++++++++++++++++++++++++++++++++++
# docker info
Data file: /var/lib/docker/devicemapper/devicemapper/data
Metadata file: /var/lib/docker/devicemapper/devicemapper/metadata
---------------------------------------------------------------
http://stackoverflow.com/questions/19234831/where-are-docker-images-stored-on-the-host-machine
---------------------------------------------------------------
++++++++++++++++++++++++++++++
--------------------------------
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 <DRIVER>)
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"
------------------------------------------------------------------------------------------------------
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#reporting-other-issues
------------------------------------------------------------------------------------------------------
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:
------------------------------------------------------------------------------------------------------
阅读(106) | 评论(0) | 转发(0) |
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
# yum -y install docker docker-registry OR # yum -y install docker-engine docker-registry
# rpm -qa | grep docker
docker-engine-selinux-1.9.1-1.el7.centos.noarch
docker-registry-0.9.1-7.el7.x86_64
docker-engine-1.9.1-1.el7.centos.x86_64
# rm /etc/docker/key.json
# systemctl daemon-reload
# systemctl start docker.service
# systemctl enable docker.service
# systemctl disable docker.service
# docker version
# docker search centos
# docker pull centos
# docker run -i -t centos /bin/bash
--------------------------------
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 <DRIVER>)
resolve:
# rm /var/lib/docker/overlay/ -rf
--------------------------------
----------------------------------------------
uninstall docker:
----------------------------------------------
systemctl stop docker
systemctl disable docker
systemctl daemon-reload
yum -y remove docker*
rm -rf /etc/docker /var/lib/docker /var/run/docker
----------------------------------------------
core—pip —— refer to /opt/tools/network_simulators/core/core/daemon/core/service.py
----------------------------------------------
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python get-pip.py
pip --help
pip -V
++++++++++++++++++++++++++++++++++++++++++++
# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
docker.io/centos latest 60e65a8e4030 4 weeks ago 196.6 MB
# docker tag c8a648134623 docker.io/centos:core
# ls /var/lib/docker/
containers devicemapper graph linkgraph.db network repositories-devicemapper tmp trust volumes
# cat /var/lib/docker/repositories-devicemapper
{"Repositories":{"docker.io/centos":{"latest":"60e65a8e4030022260a4f84166814b2683e1cdfc9725a9c262e90ba9c5ae2332"},"hello-world":{"latest":"0a6ba66e537a53a5ea94f7c6a99c534c6adb12e3ed09326d4bf3b38f7c3ba4e7"}},"ConfirmDefPush":true}
++++++++++++++++++++++++++++++++++++++++++++
Where are docker images stored on the host machine?
++++++++++++++++++++++++++++++++++++++++++++
# docker info
Data file: /var/lib/docker/devicemapper/devicemapper/data
Metadata file: /var/lib/docker/devicemapper/devicemapper/metadata
---------------------------------------------------------------
http://stackoverflow.com/questions/19234831/where-are-docker-images-stored-on-the-host-machine
---------------------------------------------------------------
The contents of the /var/lib/docker directory vary depending on the driver Docker is using for storage.
By default this will be aufs but can fall back to btrfs, devicemapper or vfs. In most places this will be aufs but the RedHats went with devicemapper.
You can manually set the storage driver with the -s or --storage-driver= option to the Docker daemon.
- /var/lib/docker/{driver-name} will contain the driver specific storage for contents of the images.
- /var/lib/docker/graph/ now only contains metadata about the image, in the json and layersize files.
In the case of aufs:
- /var/lib/docker/aufs/diff/ has the file contents of the images.
- /var/lib/docker/repositories-aufs is a JSON file containing local image information. This can be viewed with the command docker images.
In the case of devicemapper:
- /var/lib/docker/devicemapper/devicemapper/data stores the images
- /var/lib/docker/devicemapper/devicemapper/metadata the metadata
- Note these files are thin provisioned "sparse" files so aren't as big as they seem.
--------------------------------
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 <DRIVER>)
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"
------------------------------------------------------------------------------------------------------
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#reporting-other-issues
------------------------------------------------------------------------------------------------------
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:
------------------------------------------------------------------------------------------------------
相关热门文章
给主人留下些什么吧!~~
评论热议