Skip to content

Instantly share code, notes, and snippets.

@jbarber
Last active December 31, 2015 05:39
Show Gist options
  • Save jbarber/7942433 to your computer and use it in GitHub Desktop.
Save jbarber/7942433 to your computer and use it in GitHub Desktop.
Create a minimal Centos6 image for Docker, must be run on a Centos6 OS. Copied from https://github.com/dotcloud/docker/issues/290#issuecomment-15738849
#!/bin/bash
MIRROR_URL="http://centos.netnitco.net/6.4/os/x86_64/"
MIRROR_URL_UPDATES="http://centos.netnitco.net/6.4/updates/x86_64/"
yum install -y febootstrap xz
febootstrap -i bash -i coreutils -i tar -i bzip2 -i gzip -i vim-minimal -i wget -i patch -i diffutils -i iproute -i yum centos centos64 $MIRROR_URL -u $MIRROR_URL_UPDATES
touch centos64/etc/resolv.conf
touch centos64/sbin/init
tar --numeric-owner -Jcpf centos-64.tar.xz -C centos64 .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment