Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup should happen earlier #133

Closed
vrutkovs opened this issue Dec 1, 2016 · 0 comments
Closed

Cleanup should happen earlier #133

vrutkovs opened this issue Dec 1, 2016 · 0 comments
Assignees
Milestone

Comments

@vrutkovs
Copy link
Contributor

vrutkovs commented Dec 1, 2016

By the time cleanup in image.py kicks in we're storing 3 copies of the image:

  • Unpacked new image
[root@a6da0c785038 /]# ls /tmp/docker-squash-ZPZ403/new -la
total 20
drwxr-xr-x. 7 root root 4096 Dec  1 05:54 .
drwx------. 4 root root   28 Dec  1 05:56 ..
drwxr-xr-x. 2 root root   50 Dec  1 05:52 054e763e0eb8f114319318a6322e926d59d72eb84a8e99a56baeef979e667ab9
drwxr-xr-x. 2 root root   50 Dec  1 05:54 1894a5306956675dee2a2da0b8be04f2acfe5bb62719651f0aae3ce2470fea27
drwxr-xr-x. 2 root root   50 Dec  1 05:52 2e535ff4e759b85c0be7ec9a577e1e24faedccb2256a3da1f60c1dd788d3033b
drwxr-xr-x. 2 root root   50 Dec  1 05:52 67194bd4c8bbe1df57c0ac4872135f2b563be78fc32c7d04e88ba49c518f8611
-rw-r--r--. 1 root root 4209 Dec  1 05:54 88dcdf1b6a70e5ff50f2a432541fa1fe98b625ab86578997e8a20800959b86de.json
drwxr-xr-x. 2 root root   50 Dec  1 05:52 a87a0728d46dea9205f92e14827f91d81a26a36b3cb99bec74a5b2b7c903707d
-rw-r--r--. 1 root root  586 Dec  1 05:54 manifest.json
-rw-r--r--. 1 root root  165 Dec  1 05:54 repositories
  • Unpacked old image:
[root@a6da0c785038 /]# ls /tmp/docker-squash-ZPZ403/old -la
total 20
drwxr-xr-x. 7 root root 4096 Dec  1 05:54 .
drwx------. 4 root root   28 Dec  1 05:56 ..
drwxr-xr-x. 2 root root   50 Dec  1 05:52 035cec54f117e2db7374ed2b162e3bca6939953452b632a65c59043b0fe21af8
drwxr-xr-x. 2 root root   50 Dec  1 05:52 1c0b686294d58a1ffa1dae3dccf676e0b644d09be5c6e8e3cb52e93f90522061
drwxr-xr-x. 2 root root   50 Dec  1 05:52 61cdf34223ded0d5d0c14259dfe49a8cc58b82e216e2e73102d1476b4115e9e0
drwxr-xr-x. 2 root root   50 Dec  1 05:52 a715e86d26820ef1cab00828f12d8b8ce71ef943531428796f68cc8f7a45577f
drwxr-xr-x. 2 root root   50 Dec  1 05:52 ac87c06e79899012dd3216280bec191feb038b2b4a2a7b06330c4063f51783a0
-rw-r--r--. 1 root root 9006 Dec  1 05:52 e56b413d23f721d89929ad281cb043239ee1ccaec5fd42b9e723c3afc9b63a95.json
-rw-r--r--. 1 root root  805 Dec 31  1969 manifest.json
  • Tarred new image:
[root@a6da0c785038 /]# ls /tmp/tmpvfJXpY -la
total 887272
drwx------. 3 root root        37 Dec  1 05:54 .
drwxrwxrwt. 9 root root       177 Dec  1 05:52 ..
-rw-r--r--. 1 root root 908564480 Dec  1 05:54 image.tar
drwxr-xr-x. 6 root root       201 Dec  1 05:43 source

Suggestions:

  • Please add an option to remove old copy before new image is tarred
  • Can the gzipped image produced without storing a new unpacked tar? This would be useful for atomic-reactor
@goldmann goldmann added this to the 1.0.5 milestone Dec 1, 2016
@goldmann goldmann self-assigned this Dec 1, 2016
goldmann added a commit that referenced this issue Dec 6, 2016
This will let us save some space before we produce the
final tar image and (potentially) load it back to the daemon.

Fixes #133
goldmann added a commit that referenced this issue Dec 6, 2016
Remove old image dir immediately after squashing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants