https://github.com/refi64/flatpod
Convert podman containers to Flatpak runtimes
https://github.com/refi64/flatpod
Last synced: about 1 year ago
JSON representation
Convert podman containers to Flatpak runtimes
- Host: GitHub
- URL: https://github.com/refi64/flatpod
- Owner: refi64
- License: mpl-2.0
- Created: 2018-11-07T23:45:25.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-26T18:22:46.000Z (over 7 years ago)
- Last Synced: 2025-03-16T01:41:25.129Z (over 1 year ago)
- Language: JavaScript
- Size: 38.1 KB
- Stars: 20
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# flatpod
Convert podman containers to Flatpak runtimes! This was built for development purposes, in order
to be able to use the large container ecosystem for Flatpak development, as I'm on Silverblue;
the runtimes aren't really intended for publishing (you can try if you want though).
## Requirements
- [Gjs](https://gitlab.gnome.org/GNOME/gjs/wikis/Home) (already installed if you use GNOME or
some GNOME apps like Documents and Polari).
- [OSTree](https://ostree.readthedocs.io) (already installed on systems with Flatpak).
- [Flatpak](https://flatpak.org/) (considering this tool creates Flatpaks, I don't know why you
would use it without Flatpak installed).
TL;DR: **All these requirements are already satisfied on any system with GNOME and Flatpak**.
In particular, it runs out-of-the-box without any layered packages on Fedora Silverblue.
## Installation
Just copy `flatpod` to somewhere in your path, or run `./install.sh` to install to
`/usr/local/bin`. You can change the prefix, too, e.g. `./install.sh /usr` to install to
`/usr/bin`.
## Usage
Just run `flatpod container-name`, and the container will autmatically be converted to a Flatpak.
By default, the container name will undergo conversion for the resulting runtime, e.g.:
* `alpine:latest` -> `io.docker.alpine//master`
* `registry.fedoraproject.org/fedora-minimal:29` -> `org.fedoraproject.registry.fedora-minimal//29`
* `gcr.io/flutter-cirrus/build-website-image:latest` -> `io.gcr.flutter-cirrus.build-website-image//master`
You can change the Flatpak ID with `flatpod -i my.runtime.id` and the branch via
`flatpod -b my-branch`.
## Disk space
There are a couple of ways to reclaim disk space used by the Flatpod OSTree repo (stored in
`$HOME/.local/share/flatpod/repo`):
- To run a basic prune and clear the build directories, run `flatpod --cleanup prune`.
- To remove any branches related to runtimes that are unused (for instance, if you uninstalled
them), run `flatpod --cleanup unused`.
- To remove all the OCI branches (will not remove the Flatpak runtimes but will require
`podman` to re-push everything), run `flatpod --cleanup oci`.
- To clear all of the above + the uncompressed object cache, run `flatpod --cleanup all`.