Created
October 19, 2013 14:33
-
-
Save dragon3/7056683 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# Create a Amazon Linux base image for Docker | |
# | |
set -e | |
MIRROR_URL="http://packages.ap-northeast-1.amazonaws.com/2013.09/main/201309001984/x86_64/" | |
MIRROR_URL_UPDATES="http://packages.ap-northeast-1.amazonaws.com/2013.09/updates/c821ef08810f/x86_64/" | |
yum --enablerepo=epel 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 amzn amzn-201309 $MIRROR_URL -u $MIRROR_URL_UPDATES | |
touch amzn-201309/etc/resolv.conf | |
touch amzn-201309/sbin/init | |
tar --numeric-owner -Jcpf amzn-201309.tar.xz -C amzn-201309 . | |
# sudo docker import amzn-201309.tar.xz amzn-201309 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment