Skip to content

Commit ffcdea6

Browse files
authored
Create install.sh
1 parent e0bb556 commit ffcdea6

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

install.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/sh
2+
wget -O /tmp/undocker.py https://github.com/larsks/undocker/raw/c951f021e701b4ce61de03eb668a440e69646889/undocker.py
3+
sudo mkdir -p /rootfs
4+
docker pull zaoqi/github-actions-archlinux
5+
docker save zaoqi/github-actions-archlinux | sudo python3 /tmp/undocker.py -o /rootfs zaoqi/github-actions-archlinux
6+
docker rmi zaoqi/github-actions-archlinux
7+
rm -fr /tmp/undocker.py
8+
sudo sh -c "
9+
systemctl stop docker
10+
mkdir /rootfs/old.rootfs
11+
mount --bind / /rootfs/old.rootfs
12+
chroot /rootfs /bin/sh -c '
13+
cd /old.rootfs &&
14+
rm -fr sbin bin lib usr lib64 var/mail var/spool/mail &&
15+
cd /old.rootfs/etc/ &&
16+
cp -Pfr passwd group shadow hosts resolv.conf hostname sudoers sudoers.d /etc/ &&
17+
cd / &&
18+
cp -Pfr bin etc home lib lib64 mnt opt root run sbin srv usr var /old.rootfs
19+
' &&
20+
umount /rootfs/old.rootfs &&
21+
rm -fr /rootfs/
22+
"

0 commit comments

Comments
 (0)