[Docs] Add podman to README (#686)

* README: add podman

Docker always has a tendency to get in my way on Debian. Also, I really
like the userns setup for podman for giving permissions between host and
container.

* Ran linting on README

---------

Co-authored-by: Kieran Eglin <kieran.eglin@gmail.com>
This commit is contained in:
Brandon Philips 2025-04-10 09:33:34 -07:00 committed by GitHub
parent 7f56c0c802
commit f637bbd195
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -129,6 +129,23 @@ docker run \
ghcr.io/kieraneglin/pinchflat:latest ghcr.io/kieraneglin/pinchflat:latest
``` ```
### Podman
The Podman setup is similar to Docker but changes a few flags to run under a User Namespace instead of root. To run Pinchflat under Podman and use the current user's UID/GID for file access run this:
```
podman run \
--security-opt label=disable \
--userns=keep-id --user=$UID \
-e TZ=America/Los_Angeles \
-p 8945:8945 \
-v /host/path/to/config:/config:rw \
-v /host/path/to/downloads/:/downloads:rw \
ghcr.io/kieraneglin/pinchflat:latest
```
Using this setup consider creating a new `pinchflat` user and giving that user ownership to the config and download directory. See [Podman --userns](https://docs.podman.io/en/v4.6.1/markdown/options/userns.container.html) docs.
### IMPORTANT: File permissions ### IMPORTANT: File permissions
You _must_ ensure the host directories you've mounted are writable by the user running the Docker container. If you get a permission error follow the steps it suggests. See [#106](https://github.com/kieraneglin/pinchflat/issues/106) for more. You _must_ ensure the host directories you've mounted are writable by the user running the Docker container. If you get a permission error follow the steps it suggests. See [#106](https://github.com/kieraneglin/pinchflat/issues/106) for more.