Skip to content

Instantly share code, notes, and snippets.

@FoxxMD
Created September 13, 2023 18:24
Show Gist options
  • Save FoxxMD/49e25fad9d86f198f2a1bd660794235a to your computer and use it in GitHub Desktop.
Save FoxxMD/49e25fad9d86f198f2a1bd660794235a to your computer and use it in GitHub Desktop.
podman usage

UID/GID on container build

https://www.redhat.com/sysadmin/rootless-podman

Under Allocating additional UIDs/GIDs:

  • make sure you have newuidmap and newgidmap installed and have allocated ids for your normal user

for UID 2119470584, GID 2042662593 (try increasing the number of subordinate IDs in /etc/subuid and /etc/subgid

These are IDs are quite high but I don't know if that's abnormal. You can increase the number of IDs available using the instructions found under Changing the default number of IDs

Persisted Data

You may also run into file permission issues once the container is started (or starting) because of how lsio handles permissions using PUID/PGID. To fix this you can (probably) do any of the following:

Use a docker volume instead of mounted directory

podman volume create msData

In docker-compose.yaml under volumes:

volumes:
      - msData:/config

Use podman uid/gidmaps

Using podman-compose x-podman extension update docker-compose.yaml:

version: '3.7'

services:
  multi-scrobbler:
  ...
   x-podman:
     uidmaps:
        - "1000:231072:65536"
     gidmaps:
        - "1000:231072:65536"

Set permissions on mounted directory

Based on these resources:

Set permissions for your config folder based on the PUID and PGID you use:

podman unshare chown -R 1000:1000 /home/syber/multiscrobbler/config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment