adding macOS support via Docker

This commit is contained in:
Dan Sullivan 2020-12-26 21:20:25 -05:00
parent 2b6afa184e
commit 9d1b46a30b
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

@ -74,6 +74,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