Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding macOS support via Docker #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.img
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM ubuntu:latest
RUN apt-get update
RUN apt-get install parted udev -y
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ The filesystem on /dev/loop1 is now 773603 blocks long.
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 ##

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.
Expand Down
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: '2'

services:
pishrink:
build: .
volumes:
- .:/pishrink
- /dev:/dev
privileged: true