This commit is contained in:
a2f0 2023-12-10 10:11:51 -07:00 committed by GitHub
commit cf1052ed73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 0 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
*.img

3
Dockerfile Normal file
View File

@ -0,0 +1,3 @@
FROM ubuntu:latest
RUN apt-get update
RUN apt-get install parted udev -y

View File

@ -73,6 +73,16 @@ The filesystem on /dev/loop1 is now 773603 blocks long.
Shrunk pi.img from 30G to 3.1G Shrunk pi.img from 30G to 3.1G
``` ```
## macOS Support ##
It is not currently possible to run PiShrink natively in macOS. Included in the repo is a `Dockerfile` and `docker-compose.yml` that should allow you to run PiShrink on a Docker host, including a macOS one.
Note 1: The cloned repo is mounted as a Docker host mount so any output file should be created under `/pishrink` to have it persisted on the host.
Note 2: Only `*.img` is present in the provided `.dockerignore`, if you don't use this extension the created container will include your image, potentially consuming a significant amount of disk space.
Example: `docker-compose run pishrink /pishrink/pishrink.sh /pishrink/someimage.img`
## Contributing ## ## Contributing ##
If you find a bug please create an issue for it. If you would like a new feature added, you can create an issue for it but I can't promise that I will get to it. If you find a bug please create an issue for it. If you would like a new feature added, you can create an issue for it but I can't promise that I will get to it.

9
docker-compose.yml Normal file
View File

@ -0,0 +1,9 @@
version: '2'
services:
pishrink:
build: .
volumes:
- .:/pishrink
- /dev:/dev
privileged: true