Last active
December 14, 2015 20:39
-
-
Save creack/5145303 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/sh | |
rm -rf rootfs | |
mkdir rootfs | |
cd rootfs | |
mkdir -p bin etc dev dev/pts lib proc sys tmp usr var/run | |
touch etc/resolv.conf | |
cat /etc/passwd | head -1 > etc/passwd | |
cat /etc/group | head -1 > etc/group | |
ln -s lib lib64 | |
ln -s bin sbin | |
ln -s ../bin usr/bin | |
cp /bin/busybox bin | |
for X in $(busybox --list) | |
do | |
ln -s busybox bin/$X | |
done | |
rm bin/init | |
ln bin/busybox bin/init | |
#cp /usr/bin/users bin | |
#cp /var/run/utmp var/run/ | |
cp /lib/x86_64-linux-gnu/libpthread.so.0 lib | |
cp /lib/x86_64-linux-gnu/libc.so.6 lib | |
cp /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 lib | |
cp /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 lib | |
cp /lib/x86_64-linux-gnu/libdl.so.2 lib | |
for X in console null ptmx random stdin stdout stderr tty urandom zero | |
do | |
cp -a /dev/$X dev | |
done | |
tar -C . -c . -f /var/lib/docker/docker-ut.tar | |
go test -v . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment