- find sd card
diskutil list
- unmount sd card
diskutil unmountDisk /dev/disk5
- copy sd card to image
sudo dd if=/dev/rdisk5 of=input.img bs=4m
Source Drewsif/PiShrink
- image in input folder
- rename image to input.img
docker build -t pishrink-image .
docker run --privileged=true -v ./input:/usr/src/app pishrink-image