On Thu, Aug 16, 2012 at 8:57 PM, Serge Hallyn
<serge.hal...@canonical.com> wrote:
> Quoting Fajar A. Nugraha (l...@fajar.net):
>> Creating a container with "lxc-create -t ubuntu" on ubuntu 12.04 amd64
>> currently results in over 300MB root filesystem.  However, almost
>> 100MBs of it are cached package files (/var/cache/apt/archives/*).
>> Running "apt-get clean" freed it.
>>
>> Is there a particular reason to keep the package files after container 
>> creation?
>
> Hm.  Well I personally actually do end up using those often - I create a
> container; quickly build a new version of a package; do a test;  re-install
> from /var/cache/apt/archives to do another test;  etc.
>
> But that's not to say mine shouldn't be a special case, with the default
> being to save space.

Yup. Special cases like that can be catered using a private proxy or
something similar.

> Do you mind opening a bug against the ubuntu package
> for that?  (http://pad.lv/u/lxc)  I've got another small template fix to
> push anyway.  (I'll post the patch to lxc-devel when done.)
>
> Thanks for the suggestion.

Done.

FWIW, for those interested in having the smallest ubuntu container, my
test result is:
- original lxc-ubuntu: 386M disk space used
- apt-get clean: reduced to 242M
- install and use localepurge, keeping en and en_US only: reduced to 233M
- change debootstrap command to include "--variant=minbase" while
adding "iputils-ping,isc-dhcp-client,sudo" to list of packages,
followed the above three: reduced to 216M

IMHO space reduction from the last two doesn't warrant the additional
hassle, so the bug report only suggests running "apt-get clean" like
my original mail.

Using a backstore with gzip compression (e.g. btrfs, zfs) also
provides good space saving.

-- 
Fajar

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users

Reply via email to