File tree Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -4,22 +4,13 @@ rm -f ./*.img
4
4
rm -f ./* .xz
5
5
sudo umount ./mount
6
6
rm -rf mount
7
- LATEST_PI_VER=$( curl ' https://downloads.raspberrypi.org/raspios_lite_armhf/images/?C=M;O=A' 2> /dev/null | grep -oP ' \d\d\d\d-\d\d-\d\d' | tail -n 1) # holy hell
8
7
9
- wget " https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf- $LATEST_PI_VER / $LATEST_PI_VER -raspios-bullseye-armhf-lite.img .xz"
8
+ wget " https://downloads.raspberrypi.org/raspios_lite_armhf/root.tar .xz"
10
9
11
- xz -d " $LATEST_PI_VER -raspios-bullseye-armhf-lite.img .xz"
10
+ xz -d root.tar .xz
12
11
13
- DEVFILE=$( sudo kpartx -av " $LATEST_PI_VER -raspios-bullseye-armhf-lite.img" | grep -oP " loop\dp2" )
14
-
15
- mkdir mount
16
-
17
- sudo mount " /dev/mapper/$DEVFILE " ./mount
18
-
19
- sudo tar -czf - -C mount . > ./raspi.tar
20
-
21
- docker import - pimachinelearning/raspi-os-lite:" $LATEST_PI_VER " < raspi.tar
22
- docker import - pimachinelearning/raspi-os-lite:latest < raspi.tar
12
+ docker import - pimachinelearning/raspi-os-lite:" $LATEST_PI_VER " < root.tar
13
+ docker import - pimachinelearning/raspi-os-lite:latest < root.tar
23
14
24
15
docker tag pimachinelearning/raspi-os-lite:" $LATEST_PI_VER " pimachinelearning/raspi-os-lite:" $LATEST_PI_VER "
25
16
docker tag pimachinelearning/raspi-os-lite:latest pimachinelearning/raspi-os-lite:latest
You can’t perform that action at this time.
0 commit comments