From 683c5f5a62b068fd7e15b9f999d6b0140b679a1b Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Sat, 24 Jul 2021 22:49:45 +0900 Subject: [PATCH] add node overlay --- README.md | 1 + apkovl/etc/fstab | 4 ++++ bin/build | 2 ++ docker-compose.yml | 14 ++++++++++++++ fstab | 2 ++ overlay.img.gz | Bin 0 -> 588868 bytes 6 files changed, 23 insertions(+) create mode 100644 apkovl/etc/fstab create mode 100644 fstab create mode 100644 overlay.img.gz diff --git a/README.md b/README.md index 68d514a..1c7e7c8 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ rsync -a dist/ /path/to/sd/ - Docker Compose - curl - grep +- gzip - jq - ruby - ssh-keygen diff --git a/apkovl/etc/fstab b/apkovl/etc/fstab new file mode 100644 index 0000000..ce7b968 --- /dev/null +++ b/apkovl/etc/fstab @@ -0,0 +1,4 @@ +/dev/usbdisk /media/usb vfat noauto 0 0 +/dev/mmcblk0p1 /media/mmcblk0p1 vfat rw,remount 0 0 +/media/mmcblk0p1/overlay.img /media/overlay ext4 rw,relatime,errors=remount-ro 0 0 +overlay /usr overlay lowerdir=/usr,upperdir=/media/overlay/upper/usr,workdir=/media/overlay/work/usr 0 0 diff --git a/bin/build b/bin/build index 20d98f5..1b2eef5 100755 --- a/bin/build +++ b/bin/build @@ -12,4 +12,6 @@ bin/download "${version}" dist docker-compose run --rm minirootfs sh -c 'apk update && apk add' ssh-keygen -A -f apkovl cp -a usercfg.txt cache -t dist +gzip -cdk overlay.img.gz > dist/overlay.img +docker-compose run --rm builder tar czf dist/localhost.apkovl.tar.gz --owner=0 --group=0 -C apkovl . diff --git a/docker-compose.yml b/docker-compose.yml index 3857524..f59e17d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,3 +6,17 @@ services: - ./cache:/etc/apk/cache - ./apkovl/etc/apk/repositories:/etc/apk/repositories - ./apkovl/etc/apk/world:/etc/apk/world + builder: + image: ghcr.io/kou029w/yama/minirootfs + volumes: + - ./cache:/etc/apk/cache + - ./apkovl/etc/apk/repositories:/etc/apk/repositories + - ./apkovl/etc/apk/world:/etc/apk/world + - ./fstab:/etc/fstab + - ./dist/overlay.img:/overlay.img + privileged: true + command: | + sh -c ' + mount -a \ + && apk add g++ linux-headers make nodejs npm python3 + ' diff --git a/fstab b/fstab new file mode 100644 index 0000000..5618065 --- /dev/null +++ b/fstab @@ -0,0 +1,2 @@ +/overlay.img /mnt ext4 rw,relatime,errors=remount-ro 0 0 +overlay /usr overlay lowerdir=/usr,upperdir=/mnt/upper/usr,workdir=/mnt/work/usr 0 0 diff --git a/overlay.img.gz b/overlay.img.gz new file mode 100644 index 0000000000000000000000000000000000000000..1b6992bc2ceef29464a4b5d68c984357b759456a GIT binary patch literal 588868 zcmeI&dz8)f;{WlDI_O5e9f?y+r_u$}MTD57QXHI<&=;BLNOFr@V$6&#NJ5c2A=h%5 zgxo?ZMkB^0gP0i+at&iJX7+r3+c`78|Gv-GcYV+Kt?zHG=ls!3^L+39`RvEMM%HRq z9A2WtmZNzuhKlv*+p$;I_Wi4M?$#-Ea&N6JH?{xMAI?l{d*sul3?Q0?zeq;_n@HVdrg`@kkRI*xK1e@y7%tbuX)|g$$u{PC4+j}=&mUSe0YT1N!dp{hO6xjb;;%KWPyU2`;j z|G;kTKi|Ipn;*y4TzuPSy{a6Ue>Cs=?Hi)AzD*ysc|+^uF;8V(9C|wAz3kV<9(thS zORZ*hTw1MSkGQ{e`$N;DF4cnrr&0#YN*Okx$M6%0Q!9=vp8Mv7wHtT$=zUcv6gs!_ zqucY}FB%FBn)2}6ck@d{zE!KsGdG4SM!x8kHtF`uF_ABRSy1)K^NEo!Htn5s)Apc9 zC{(G_se3*NiiJXtZLR(66G8DSkMA?5;PEFK6+V7y!Q;Djd+*mE^7s#y^eKE;TH)1B z6khGisKSeEEWF6%!sqVRwBRYfytD97TH&F6|MyU{!s|{hyzl73(<2K{*J)mGyV->| zuy1VP>2U>LoE#H6xqEQ8N}*7(#Vy{8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