Powerwall-Dashboard icon indicating copy to clipboard operation
Powerwall-Dashboard copied to clipboard

Podman Support

Open oneguynick opened this issue 1 year ago • 2 comments

Problem

I have slowly migrated most of my personal container usage to podman. My last remaining stack was Powerwall. The transition was pretty simple, given the project's aim for rootless docker containers.

Enhancement

Ideally, the setup code would account for both docker and podman environments. My edits were, in most cases, as simple as sed docker for podman. I additionally needed to chown some directories to account for the permissions within podman, but outside of that and small QOL script updates for the compose, it worked first try.

Additional context

You can see the work here: https://github.com/oneguynick/Powerwall-Dashboard

oneguynick avatar Apr 06 '23 10:04 oneguynick

Thanks @oneguynick !

Here is an option on how we can add "podman" support.

I suggest that we change all the scripts to check for and pull in a PLATFORM file that contains either “docker” or “podman”. This file would NOT exist in the repo but would be created during setup:

During setup.sh:

  • Add logic to determine if podman or docker are available - if both available, let user decide with a prompt, if only one is available, use that. Default: docker.
  • Create a file PLATFORM in install directory to be used by other scripts (contains only “docker” or “podman”)
  • Replace all references to “docker” command with “${PLATFORM}"

For upgrade.sh, compose-dash.sh, verify.sh, weather.sh, etc.

  • Add logic: If PLATFORM file exist, set platform variable to what is in that file. If it does not exist, default to “docker”.
  • Replace all references to “docker” with “${PLATFORM}”

The advantage of the above approach is that existing installations (all docker) would not be impacted as docker will be default. All new installs will have option to pick between docker or podman (if installed).

@oneguynick we would need to add logic for the podman-only things you had to do.

Community: concerns, thoughts, ideas?

jasonacox avatar Apr 07 '23 05:04 jasonacox

Interesting idea. This might make worthwhile reading...

https://www.redhat.com/en/topics/containers/what-is-podman

That makes me wonder whether podman should be the default rather than docker?

dkerr64 avatar Apr 10 '23 18:04 dkerr64