Docker modifies the default storage location

Source: Internet
Author: User

    • Start by using Docker info to see the basic information about Docker
sudo docker infocontainers:0Images:5Storage Driver:devicemapper Pool name:docker-253:0-679369-pool Pool Blocksize:65.54 KB backing Filesystem:extfs Data file:metadata file:data Space used:533.9 MB Data Space Total:107.4 GB Data Space Available:106.8 GB Metadata Space used:954.4 KB Metadata Space Total:2.147 GB Metadata Space Available:2.147 GB Udev Sync supported: true Deferred removal Enabled: false Library Version: 1.02. 89-rhel6 (2014-09-01) Execution Driver:native-0.2logging driver:json-filekernel Version: 2.6. 32-431.29. 2.el6.x86_64operating System: <unknown>cpus: 1total Memory: 853.5 mibname:rhel62buildid:lio4:i43u:yfqu:sn45:yoe6:7GTF:< Span class= "Hljs-number" >6agx:vskq:iciv:akwd:3okq:husc     
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21st
    • 22
    • 23
    • 24
    • 25
    • 26

This is a newly refurbished Docker environment, which does not see the path to the current Docker file store. However, Docker uses/var/lib/docker as the default storage location by default.

    • Stop the Docker service
sudo /etc/init.d/docker stop
    • 1
    • Back up the original default/var/lib/docker, then copy to a different location and create a soft link
cd /var/libsudo cp -rf docker docker.baksudo cp -rf docker /<my_new_location>/sudo ln -s /<my_new_location>/docker docker
    • 1
    • 2
    • 3
    • 4
    • Start the Docker service
sudo /etc/init.d/docker start
    • 1
    • Finally, use Docker info to view the update results
sudo docker infocontainers:0Images:5Storage Driver:devicemapper Pool name:docker-8:21-393695-pool Pool Blocksize:65.54 KB backing filesystem:extfs data file:/dev/loop1 Metadata file:/dev/loop2 Data Space used:533.9 MB Data Space Total:107.4 GB Data Space Available:15.33 GB Metadata Space used:954.4 KB Metadata Space Total:2.147 GB Metadata Space Available:2.147 GB Udev Sync Supported:True Deferred removal Enabled:false Data Loop file:/build/docker/devicemapper/devicemapper/data Metadata loop file:/ Build/docker/devicemapper/devicemapper/metadata Library Version: 1.02.89-rhel6 (2014-09-01 ) Execution Driver:native-0.2logging driver:json-filekernel Version: 2.6. 32-431.29. 2.el6.x86_64operating System: <unknown>cpus: 1total Memory: 853.5 mibname:rhel62buildid:lio4:i43u:yfqu:sn45:yoe6:7GTF:< Span class= "Hljs-number" >6agx:vskq:iciv:akwd:3okq:husc     
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21st
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28

Please indicate this address in the form of a link.
This address: http://blog.csdn.net/kongxx/article/details/50310653

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Top 0

Docker modifies the default storage location

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.