Outils pour utilisateurs

Outils du site


tech:pb_podman

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
tech:pb_podman [2026/05/28 17:16] – créée Jean-Baptistetech:pb_podman [2026/11/03 15:46] (Version actuelle) – Jean-Baptiste
Ligne 1: Ligne 1:
 +<!DOCTYPE markdown>
 +{{tag>Pb podman Rootless LDAP}}
 +
 +# Pb Podman
 +
 +
 +Voir :
 +  * [[Pb podman - image is in use by a container]]
 +
 +
 +Voir aussi :
 +  * /proc/sys/user/max_user_namespaces
 +
 +
 +## Err ldap - no subuid
 +
 +Podman userland avec LDAP
 +~~~
 +$ podman ps
 +ERRO[0000] cannot find UID/GID for user user1@acme.local: no subuid ranges found for user "user1@acme.local" in /etc/subuid - check rootless mode in man pages.
 +WARN[0000] Using rootless single mapping into the namespace. This might break some images. Check /etc/subuid and /etc/subgid for adding sub*ids if not using a network user
 +CONTAINER ID  IMAGE       COMMAND     CREATED     STATUS      PORTS       NAMES
 +~~~
 +
 +
 +### Solution
 +
 +~~~bash
 +#echo "$(id -un):$(id -u):65536" | sudo tee -a /etc/subuid
 +#echo "$(id -gn):$(id -g):65536" | sudo tee -a /etc/subgid
 +
 +sudo usermod --add-subuids "$(id -u)-$(( $(id -u) + 65535))" --add-subgids "$(id -g)-$(( $(id -g) + 65535))" "$(id -un)"
 +~~~
 +
 +
 +## Err Failed to get rootless runtime dir for DefaultAPIAddress: lstat /run/user/1000: no such file or directory
 +
 +Voir :
 +* https://support.scc.suse.com/s/kb/Podman-warns-cgroupv2-manager-is-set-to-ssytemd-without-a-user-session
 +
 +~~~
 +$ podman ps
 +WARN[0000] Failed to get rootless runtime dir for DefaultAPIAddress: lstat /run/user/1000: no such file or directory
 +WARN[0000] RunRoot is pointing to a path (/run/user/1000/containers) which is not writable. Most likely podman will fail.
 +Error: default OCI runtime "runc" not found: invalid argument
 +~~~
 +
 +~~~bash
 +sudo mkdir /run/user/1000
 +sudo chown 1000:1000 /run/user/1000
 +~~~
 +
 +
 +~~~
 +$ podman ps
 +WARN[0001] "/" is not a shared mount, this could cause issues or missing mounts with rootless containers
 +WARN[0001] The cgroupv2 manager is set to systemd but there is no systemd user session available
 +WARN[0001] For using systemd, you may need to log in using a user session
 +WARN[0001] Alternatively, you can enable lingering with: `loginctl enable-linger 1000` (possibly as root)
 +WARN[0001] Falling back to --cgroup-manager=cgroupfs
 +CONTAINER ID  IMAGE       COMMAND     CREATED     STATUS      PORTS       NAMES
 +WARN[0003] Failed to add pause process to systemd sandbox cgroup: dial unix /run/user/1000/bus: connect: no such file or directory
 +~~~
 +
 +~~~bash
 +mount --make-shared /
 +~~~
 +
 +~~~
 +$ podman ps
 +WARN[0000] The cgroupv2 manager is set to systemd but there is no systemd user
 +WARN[0000] For using systemd, you may need to log in using a user session
 +WARN[0000] Alternatively, you can enable lingering with: `loginctl enable-linge
 +WARN[0000] Falling back to --cgroup-manager=cgroupfs
 +CONTAINER ID  IMAGE       COMMAND     CREATED     STATUS      PORTS       NAMES
 +~~~
 +
 +
 +### Solution
 +
 +~~~bash
 +sudo loginctl enable-linger management
 +~~~
 +
 +~~~
 +$ podman ps
 +ERRO[0001] Refreshing container 95cfa640ab028aed83857a9288956d4aff585eb863e8041a737d4be9f98b64df: acquiring lock 0 for container 95cfa640ab028aed83857a9288956d4aff585eb863e8041a737d4be9f98b64df: file exists
 +ERRO[0001] Refreshing container 76f17f10362a77c722eb00dff478e2f1245a4860a6b11f7cdb4b2e42d3ae80f7: acquiring lock 1 for container 76f17f10362a77c722eb00dff478e2f1245a4860a6b11f7cdb4b2e42d3ae80f7: file exists
 +ERRO[0001] Refreshing volume b7fa2f4a2f95a538232ec51f0ff6defc3613a6568fd2dedef13d1bd6f1113ee2: acquiring lock 3 for volume b7fa2f4a2f95a538232ec51f0ff6defc3613a6568fd2dedef13d1bd6f1113ee2: file exists
 +CONTAINER ID  IMAGE       COMMAND     CREATED     STATUS      PORTS       NAMES
 +~~~
 +
 +
 +~~~
 +$ podman ps
 +CONTAINER ID  IMAGE       COMMAND     CREATED     STATUS      PORTS       NAMES
 +~~~
 +
 +
 +Autre solution à tester
 +
 +`${HOME}/.config/containers/containers.conf`
 +~~~ini
 +[engine]
 +events_logger = "file"
 +cgroup_manager = "cgroupfs"
 +~~~
 +
 +
 +## Err Error: initializing source - manifest unknown
 +
 +Voir aussi :
 +* https://jfrog.com/help/r/artifactory-how-to-troubleshoot-docker-image-not-found-or-manifest-unknown-errors-through-artifactory/artifactory-how-to-troubleshoot-docker-image-not-found-or-manifest-unknown-errors-through-artifactory
 +
 +~~~
 +$ podman pull docker.io/ansible/ansible-container-builder
 +Trying to pull docker.io/ansible/ansible-container-builder:latest...
 +Error: initializing source docker://ansible/ansible-container-builder:latest: reading manifest latest in docker.io/ansible/ansible-container-builder: manifest unknown
 +~~~
 +
 +
 +### Solution
 +
 +Il manquait le tag
 +
 +~~~
 +$ podman search --list-tags docker.io/ansible/ansible-container-builder
 +NAME                                         TAG
 +docker.io/ansible/ansible-container-builder  0.1
 +docker.io/ansible/ansible-container-builder  0.2
 +docker.io/ansible/ansible-container-builder  0.3
 +~~~
 +
 +~~~bash
 +podman pull docker.io/ansible/ansible-container-builder:0.3
 +~~~
 +
 +
 +## Error: trying to reuse blob .... pinging container registry ... Service Unavailable
 +
 +~~~
 +$ podman push registry.acme.local/ratpc-docker-release-local:v0.0.2
 +Getting image source signatures
 +Error: trying to reuse blob sha256:b745114aa4631b625bce59b474a3ea349d3962528b4eb8f70f3a573b1342d699 at destination: pinging container registry registry.acme.local: Get "https://registry.acme.local/v2/": Service Unavailable
 +~~~
 +
 +
 +### Solution
 +
 +~~~bash
 +unset http_proxy
 +unset https_proxy
 +unset HTTP_PROXY
 +unset HTTPS_PROXY
 +~~~
 +
 +
 +
 +
 +
 +## Error: writing blob: initiating layer upload to /blobs/uploads/ unknown: Not Found
 +
 +~~~
 +Error: writing blob: initiating layer upload to /v2/ratpc-docker-release-local/blobs/uploads/ in registry.acme.local: unknown: Not Found
 +Error: writing blob: initiating layer upload to /blobs/uploads/  unknown: Not Found
 +~~~
 +
 +
 +### Solution
 +
 +Le tag n'était pas bon. Ici nous avons le nom d'un dossier, il fallait ajouter le nom de l'image.
 +
 +~~~bash
 +podman tag localhost/ee-base:v0.0.2 registry.acme.local/ratpc-docker-release-local/ee-base:v0.0.2
 +podman push registry.acme.local/ratpc-docker-release-local/ee-base:v0.0.2
 +~~~
 +
 +
 +## Err - CAP_CHOWN
 +
 +
 +~~~
 +$ podman build -t plop:plop .
 +...
 +[1/2] STEP 65/71: RUN chown -R pcc:users /home/pcc/
 +time="2026-10-01T10:25:55+02:00" level=warning msg="can't raise ambient capability CAP_CHOWN: operation not permitted"
 +time="2026-10-01T10:25:55+02:00" level=warning msg="can't raise ambient capability CAP_DAC_OVERRIDE: operation not permitted"
 +time="2026-10-01T10:25:55+02:00" level=warning msg="can't raise ambient capability CAP_FOWNER: operation not permitted"
 +time="2026-10-01T10:25:55+02:00" level=warning msg="can't raise ambient capability CAP_FSETID: operation not permitted"
 +time="2026-10-01T10:25:55+02:00" level=warning msg="can't raise ambient capability CAP_KILL: operation not permitted"
 +time="2026-10-01T10:25:55+02:00" level=warning msg="can't raise ambient capability CAP_NET_BIND_SERVICE: operation not permitted"
 +time="2026-10-01T10:25:55+02:00" level=warning msg="can't raise ambient capability CAP_SETFCAP: operation not permitted"
 +time="2026-10-0T10:25:55+02:00" level=warning msg="can't raise ambient capability CAP_SETGID: operation not permitted"
 +time="2026-10-01T10:25:55+02:00" level=warning msg="can't raise ambient capability CAP_SETPCAP: operation not permitted"
 +time="2026-10-01T10:25:55+02:00" level=warning msg="can't raise ambient capability CAP_SETUID: operation not permitted"
 +time="2026-10-01T10:25:55+02:00" level=warning msg="can't raise ambient capability CAP_SYS_CHROOT: operation not permitted"
 +~~~
 +
 +
 +### Solution
 +
 +Mettre à jour Podman
 +
 +
 +
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki