andsens / build-debian-cloud

This project has been superseeded by andsens/bootstrap-vz and is no longer maintained - Script to create Debian Squeeze & Wheezy Amazon Machine Images (AMIs) and Google Compute Engine images
Other
117 stars 43 forks source link

apt-get update in the image at the end of the build ? #64

Closed charles-plessy closed 11 years ago

charles-plessy commented 11 years ago

Hi Anders,

how about running apt-get update before wrapping up the image ? For Stable, most packages will not be updated after the release, so the information in the apt cache will stay relevant for long.

I am writing this because each time I use the Debian Squeeze image, I do apt-get install vim, get an error, then run apt-get update and apt-get install vim again.

I know that packages like cloud-init also have facilities to automatically run apt-get update at run time, but I do not see this as redundant.

Cheers,

Charles

andsens commented 11 years ago

You are right, this is an issue. I was thinking of maybe doing this on first boot? This would prolong the boot time though. If we do it when bootstrapping we actually do not need to add anything, we just remove the part that clears the cache :-)