技术控

    今日:96| 主题:49531
收藏本版 (1)
最新软件应用技术尽在掌握

[其他] Disk space usage leak in Docker for Mac

[复制链接]
亲爱的裸婚 发表于 2016-11-30 03:09:24
89 0

立即注册CoLaBug.com会员,免费获得投稿人的专业资料,享用更多功能,玩转个人品牌!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
Expected behavior

  Amount of disk space used under ~/Library/Containers/com.docker.docker/ should shrink when deleting images and/or containers
  Actual behavior

  Amount of disk space used under ~/Library/Containers/com.docker.docker/ doesn't shrink after deleting ~50 containers and ~141 images (out of a total of 194). My Docker.qcow2 was 41GB both before and after doing these deletions.
  On the Diagnose & Feedback screen I see an error that looks relevant:
  1. Docker for Mac: version: mac-v1.12.0.1
  2. OS X: version 10.11.6 (build: 15G31)
  3. logs: /tmp/5F7A165B-83AC-4514-AFC4-DB53430D2E9D/20160819-141130.tar.gz
  4. [OK]     docker-cli
  5. [OK]     app
  6. [OK]     moby-syslog
  7. [ERROR]  disk
  8.          disk check failed with: Failure("exec: /Applications/Docker.app/Contents/Resources/bin/../../../Contents/MacOS/qemu-img check /Users/julie/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2 > /tmp/5F7A165B-83AC-4514-AFC4-DB53430D2E9D/20160819-141130/qemu-img-check.stdout 2> /tmp/5F7A165B-83AC-4514-AFC4-DB53430D2E9D/20160819-141130/qemu-img-check.stderr: exit 2")
  9. [OK]     virtualization
  10. [OK]     system
  11. [OK]     menubar
  12. [OK]     osxfs
  13. [OK]     db
  14. [OK]     slirp
  15. [OK]     moby-console
  16. [OK]     logs
  17. [OK]     vmnetd
  18. [OK]     env
  19. [OK]     moby
  20. [OK]     driver.amd64-linux
复制代码
Information

  For some history, seedocker/docker#23437  
  
       
  • Diagnostic ID from "Diagnose & Feedback" in the menu.      
    I might not have this anymore since I had to do a factory reset in order to reclaim the disk space. After the factory reset, it is: 5F7A165B-83AC-4514-AFC4-DB53430D2E9D   
  • a reproducible case if this is a bug, Dockerfiles FTW  
  Easy to reproduce by pulling some images, observing the size of Docker.qcow2, deleting the images and seeing that the size of Docker.qcow2 does not change. Let me know if more info is needed
  
       
  • page URL if this is a docs issue or the name of a man page   
  • host distribution and version (OSX 10.10.x, OSX 10.11.x)  
  OSX 10.11.6
  Steps to reproduce the behavior

  
       
  • pull several images   
  • run a couple of containers   
  • observe size of ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2   
  • stop and delete all containers   
  • delete all images   
  • repeat step 3. Size has not shrunk despite there being no images or containers  
  Transcript:
  1. $ docker pull frolvlad/alpine-scala
  2. Using default tag: latest
  3. latest: Pulling from frolvlad/alpine-scala
  4. e110a4a17941: Pull complete
  5. 052edde983dc: Pull complete
  6. 44b3390a7725: Pull complete
  7. 0f6b9d2879c1: Pull complete
  8. Digest: sha256:1d9f6fd716526764a4ba6e389b635cbef8c5d413216bf5d00ca5175fc0d9bac8
  9. Status: Downloaded newer image for frolvlad/alpine-scala:latest
  10. $ du -sm ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2
  11. 1290    /Users/julie/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2
  12. $ docker pull ubuntu
  13. Using default tag: latest
  14. latest: Pulling from library/ubuntu
  15. 2f0243478e1f: Pull complete
  16. d8909ae88469: Pull complete
  17. 820f09abed29: Pull complete
  18. 01193a8f3d88: Pull complete
  19. Digest: sha256:8e2324f2288c26e1393b63e680ee7844202391414dbd48497e9a4fd997cd3cbf
  20. Status: Downloaded newer image for ubuntu:latest
  21. $ du -sm ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2
  22. 1456    /Users/julie/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2
  23. $ docker pull python
  24. Using default tag: latest
  25. latest: Pulling from library/python
  26. 357ea8c3d80b: Pull complete
  27. 52befadefd24: Pull complete
  28. 3c0732d5313c: Pull complete
  29. ceb711c7e301: Pull complete
  30. 4211bb537697: Pull complete
  31. 71f9074c0739: Pull complete
  32. 3e5349707036: Pull complete
  33. Digest: sha256:a755ad5a30b2146f9a132bf74107aa5be9a26b7cc77956b379af678e0f311b3c
  34. Status: Downloaded newer image for python:latest
  35. $ docker run ubuntu
  36. $ docker run -it ubuntu bash
  37. [email protected]:/# exit
  38. $ docker run -itd ubuntu bash
  39. 95f5bed47a790d2c8d60544cbc1fa870e1ef4b8c04653508bed34fb25e650536
  40. $ docker ps -a
  41. CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                      PORTS               NAMES
  42. 95f5bed47a79        ubuntu              "bash"              9 seconds ago       Up 9 seconds                                    hungry_lalande
  43. a2ae24adfd12        ubuntu              "bash"              28 seconds ago      Exited (0) 21 seconds ago                       sharp_borg
  44. a567a8a7aed3        ubuntu              "/bin/bash"         53 seconds ago      Exited (0) 52 seconds ago                       ecstatic_poitras
  45. $ du -sm ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2
  46. 2371    /Users/julie/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2
  47. $ docker stop hungry_lalande
  48. hungry_lalande
  49. $ docker rm -v $(docker ps -a -q -f status=exited)
  50. 95f5bed47a79
  51. a2ae24adfd12
  52. a567a8a7aed3
  53. $ docker rmi $(docker images -q)
  54. Untagged: ubuntu:latest
  55. Untagged: [email protected]:8e2324f2288c26e1393b63e680ee7844202391414dbd48497e9a4fd997cd3cbf
  56. Deleted: sha256:f8d79ba03c00bbcd8079cf05b7526ac8f4f422744aad8c3747a29a38ed8c4a41
  57. Deleted: sha256:b4119cffabb62bd6374f5b06adcb820344490252b621cb8f6a8fad7f6f61b3ae
  58. Deleted: sha256:83a17331cb4259e2690395586b641aabadf30256f25a032019b816a53a06ae6e
  59. Deleted: sha256:30ae5404a524e7a713f86ebe832b1e198d1270d62b27c860721055b890a3ae9c
  60. Deleted: sha256:d8d865b23727fa63dc7d4e9f02efc3e2433c8f220972689c6b6ba09e8136c162
  61. Untagged: python:latest
  62. Untagged: [email protected]:a755ad5a30b2146f9a132bf74107aa5be9a26b7cc77956b379af678e0f311b3c
  63. Deleted: sha256:a08871375facdc1619fc6d19608a4555db479219b2853e2e11de05eddf97e4cb
  64. Deleted: sha256:0878d93537f4951aa5fa1ca6fd7ef085aa993e520b5af01148d84704ef49abcf
  65. Deleted: sha256:2d5707b912a332c89665a078a2dabb088cbb4e6982b0d3db36217c89640074da
  66. Deleted: sha256:5f6d1bd4cff3a349d2b5989bf04295987b6d679c411357612523341d4b6f2264
  67. Deleted: sha256:0e54104f61d3ae37dc10fbc275796123a40b54859776fb6e937bb5c39655c3e6
  68. Deleted: sha256:d3c72419ca593d81f207884b70670fd69c4fa3bdecf926ecbbbd9d3bbdd6c7bf
  69. Deleted: sha256:016fc440b1e6b49d889b0f325d2439c82c92f554d3f015db67ffde823bd2ff3e
  70. Deleted: sha256:2f71b45e4e254ddceb187b1467f5471f0e14d7124ac2dd7fdd7ddbc76e13f0e5
  71. Untagged: frolvlad/alpine-scala:latest
  72. Untagged: [email protected]:1d9f6fd716526764a4ba6e389b635cbef8c5d413216bf5d00ca5175fc0d9bac8
  73. Deleted: sha256:ac1474efe52e017303f24209fff310c734eed81cdd947604545f160d03f2caad
  74. Deleted: sha256:a08f99075408eb40ce74942b01d08003c8d923b8df0b0e593b73b13540850171
  75. Deleted: sha256:5c86a5cfb5b67143c7ec277ac533176abb9906072eac82de512f8e822b06e769
  76. Deleted: sha256:2615ff2c2f8c27913239080269f5be78d541b2564592856548b435f5daa42514
  77. Deleted: sha256:4fe15f8d0ae69e169824f25f1d4da3015a48feeeeebb265cd2e328e15c6a869f
  78. $ docker info
  79. Containers: 0
  80. Running: 0
  81. Paused: 0
  82. Stopped: 0
  83. Images: 0
  84. Server Version: 1.12.0
  85. Storage Driver: aufs
  86. Root Dir: /var/lib/docker/aufs
  87. Backing Filesystem: extfs
  88. Dirs: 0
  89. Dirperm1 Supported: true
  90. Logging Driver: json-file
  91. Cgroup Driver: cgroupfs
  92. Plugins:
  93. Volume: local
  94. Network: null host bridge overlay
  95. Swarm: inactive
  96. Runtimes: runc
  97. Default Runtime: runc
  98. Security Options: seccomp
  99. Kernel Version: 4.4.15-moby
  100. Operating System: Alpine Linux v3.4
  101. OSType: linux
  102. Architecture: x86_64
  103. CPUs: 4
  104. Total Memory: 1.954 GiB
  105. Name: moby
  106. ID: KQ7I:O3AX:CY77:DKU4:6LZR:Y6RF:ZM2P:U2YA:TZUV:3YDV:DQPU:OTJV
  107. Docker Root Dir: /var/lib/docker
  108. Debug Mode (client): false
  109. Debug Mode (server): true
  110. File Descriptors: 18
  111. Goroutines: 29
  112. System Time: 2016-08-19T21:24:33.294921776Z
  113. EventsListeners: 1
  114. No Proxy: *.local, 169.254/16
  115. Registry: https://index.docker.io/v1/
  116. Insecure Registries:
  117. 127.0.0.0/8
  118. $ du -sm ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2
  119. 2371    /Users/julie/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2
复制代码
友荐云推荐




上一篇:The Insecurity of OpenBSD (2010)
下一篇:Bitfury Paper Makes Case For Auditability As Blockchain's Defining Feature
酷辣虫提示酷辣虫禁止发表任何与中华人民共和国法律有抵触的内容!所有内容由用户发布,并不代表酷辣虫的观点,酷辣虫无法对用户发布内容真实性提供任何的保证,请自行验证并承担风险与后果。如您有版权、违规等问题,请通过"联系我们"或"违规举报"告知我们处理。

*滑动验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

我要投稿

推荐阅读

扫码访问 @iTTTTT瑞翔 的微博
回页顶回复上一篇下一篇回列表手机版
手机版/CoLaBug.com ( 粤ICP备05003221号 | 文网文[2010]257号 )|网站地图 酷辣虫

© 2001-2016 Comsenz Inc. Design: Dean. DiscuzFans.

返回顶部 返回列表