Skip to content

Commit

Permalink
update runner image, use run-parts
Browse files Browse the repository at this point in the history
  • Loading branch information
knoopx committed Jul 17, 2021
1 parent fb590c6 commit 163c3f1
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 13 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
19 changes: 8 additions & 11 deletions make-image
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,13 @@ apt-get update
curl https://raw.githubusercontent.com/alpinelinux/alpine-chroot-install/master/alpine-chroot-install | sh

cp -R bootstrap/ /alpine/

/alpine/enter-chroot /bootstrap/kernel.sh
/alpine/enter-chroot /bootstrap/system.sh
/alpine/enter-chroot /bootstrap/users.sh
/alpine/enter-chroot /bootstrap/networking.sh
/alpine/enter-chroot /bootstrap/services.sh
/alpine/enter-chroot /bootstrap/first-boot.sh
/alpine/enter-chroot run-parts /bootstrap/

rm -rf /alpine/var/lib/apt/lists/*
rm -rf /alpine/var/cache/apk/*
rm -rf /alpine/root/*
rm -rf /alpine/bootstrap/
rm /alpine/enter-chroot
rm /alpine/etc/resolv.conf
rm /alpine/env.sh
rm /alpine/env.sh /alpine/etc/resolv.conf /alpine/enter-chroot /alpine/destroy
find /alpine -iname "*-" -delete
find /alpine -iname "*~" -delete

Expand All @@ -78,7 +70,12 @@ resize2fs -p "$ROOT_DEV" $ROOT_MIN_SIZE

# shrink partition
PART_END=$(($ROOT_PART_START + ($ROOT_MIN_SIZE * $ROOT_BLOCK_SIZE)))
parted ---pretend-input-tty "$OUTPUT_IMG" unit B resizepart 2 $PART_END yes
parted ---pretend-input-tty "$OUTPUT_IMG" <<EOF
unit B
resizepart 2 $PART_END
yes
quit
EOF

losetup -d "$LOOP_DEV"

Expand Down
4 changes: 2 additions & 2 deletions runner/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
FROM ubuntu:bionic
RUN apt-get update && apt-get install -y e2fsprogs dosfstools xxd parted udev wget curl qemu-user-static binfmt-support subversion zerofree
FROM ubuntu:hirsute
RUN apt-get update && apt-get install -y e2fsprogs dosfstools xxd parted udev wget curl qemu-user-static binfmt-support zerofree fdisk

0 comments on commit 163c3f1

Please sign in to comment.