Several small tweaks/fixes for contrib/mkimage-debian.sh#1883
Several small tweaks/fixes for contrib/mkimage-debian.sh#1883tianon merged 1 commit intomoby:masterfrom
Conversation
|
For what it's worth, I've successfully updated both |
|
Nice. Bonus points for teaching me about $'.....' to interpret -escaped Do we want to add those hacks too? (Not mandatory, but hey, while we're this forces dpkg not to call sync() after package extraction andspeeds up install we don't need and apt cache in a containerRUN echo "Acquire::http {No-Cache=True;};" > /etc/apt/apt.conf.d/no-cache |
|
Sounds great to me; new commit pending! |
|
Currently, this script handles ubuntu surprisingly well also ( |
|
As far as I'm concerned, do whatever you're the most comfortable with! |
|
LGTM. |
|
This looks great @tianon! |
|
Cool, then it looks like this one is ready for merge. I'm happy to squash, if that's desired. I'll submit my ideas for better ubuntu tagging in a later pull, since I haven't fleshed them out completely yet and it appears that we've got enough agreement for this to go in now. |
|
I've just squashed and rebased this so that it can be merged and keep cleaner release changelogs. Is there anything necessary left before we merge? |
Add simple workaround for moby#1755 to contrib/mkimage-debian.sh Add simple echo patch in contrib/mkimage-debian.sh to prevent init scripts from running during apt-get installs/updates Add `apt-get clean` to mkimage-debian.sh for slightly smaller images Add more small apt tweaks to mkimage-debian.sh thanks to @jpetazzo and @spahl
|
LGTM |
Several small tweaks/fixes for contrib/mkimage-debian.sh
I decided it was time to workaround #1755 in the mkimage-debian.sh script, so I figured out a simple fix. Now we just let
docker importtag the image directly, and we don't care about the actual image hash, sincedocker taglets us userepo:tagin place of the image hash to just tag an existing tag elsewhere, and that works swell for our purposes here.While I was there (and since @shykes and I were discussing it on IRC), I added the /usr/sbin/policy-rc.d mentioned in #446 by default, since the vast majority of docker users are surprised when they
apt-get installorapt-get upgradeand services fail to start and that sometimes makes the install fail. Users who specifically run with /sbin/init can then delete that file, instead of the rest of us having to add it, which makes a lot of sense.Finally, I also added
apt-get cleanright before we import so that we get smaller images (since the basic idea of this script is to create base images), and on wheezy I went from ~157.5MB down to ~120MB, which I think is a worthwhile decrease.cc @KSid