Created
November 27, 2013 21:06
-
-
Save colinsurprenant/7683187 to your computer and use it in GitHub Desktop.
Docker Ubuntu raring 13.04 image creation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo debootstrap raring raring > /dev/null | |
cd raring | |
# prevent init scripts from running during install/update | |
echo $'#!/bin/sh\nexit 101' | sudo tee usr/sbin/policy-rc.d > /dev/null | |
# see https://github.com/dotcloud/docker/issues/446#issuecomment-16953173 | |
sudo chmod +x usr/sbin/policy-rc.d | |
# shrink the image | |
sudo chroot . apt-get clean | |
# forces dpkg not to call sync() after package extraction and speeds up install | |
echo 'force-unsafe-io' | sudo tee etc/dpkg/dpkg.cfg.d/02apt-speedup > /dev/null | |
# we don't need an apt cache in a container | |
echo 'Acquire::http {No-Cache=True;};' | sudo tee etc/apt/apt.conf.d/no-cache > /dev/null | |
sudo tar -c . | sudo docker import - ubuntu-raring |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment