Skip to content

Instantly share code, notes, and snippets.

@ChaosEngine
Last active August 29, 2015 14:16
Show Gist options
  • Save ChaosEngine/96dee668e2c196fe1f4c to your computer and use it in GitHub Desktop.
Save ChaosEngine/96dee668e2c196fe1f4c to your computer and use it in GitHub Desktop.
docker-gentoo build
stage3_suffix="" # e.g. -hardened
dist="http://distfiles.gentoo.org/releases/amd64/autobuilds"
stage3="$(wget -O- ${dist}/latest-stage3-amd64${suffix}.txt | tail -n 1 | cut -f 1 -d ' ')"
echo "Downloading and extracting ${stage3}..."
echo "${dist}/${stage3}" -q
bunzip2 ${stage3} | tar xf -
# | busybox tar \
# --exclude="./etc/hosts" \
# --exclude="./sys/*" \
# -pxjf -
#
## Setup the rc_sys
#sed -e 's/#rc_sys=""/rc_sys="lxc"/g' -i /etc/rc.conf
# Setup the net.lo runlevel
#ln -s /etc/init.d/net.lo /run/openrc/started/net.lo
## Setup the net.eth0 runlevel
#ln -s /etc/init.d/net.lo /etc/init.d/net.eth0
#ln -s /etc/init.d/net.eth0 /run/openrc/started/net.eth0
## By default, UTC system
#echo 'UTC' > /etc/timezone
## Self destruct
#rm /Dockerfile
#rm /build.sh
#echo "Bootstrapped ${stage3} into /:"
#ls --color -lah
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment