Outils pour utilisateurs

Outils du site


tech:notes_podman

Différences

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

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
tech:notes_podman [2025/03/30 20:53] Jean-Baptistetech:notes_podman [2026/01/20 10:43] (Version actuelle) Jean-Baptiste
Ligne 1: Ligne 1:
 <!DOCTYPE markdown> <!DOCTYPE markdown>
 +{{tag>Podman Docker}}
 +
 # Notes Podman # Notes Podman
  
 Voir : Voir :
 +* https://github.com/containers/podman/blob/main/troubleshooting.md#5-rootless-containers-cannot-ping-hosts
 * https://blog.stephane-robert.info/docs/conteneurs/moteurs-conteneurs/podman/ * https://blog.stephane-robert.info/docs/conteneurs/moteurs-conteneurs/podman/
 * https://github.com/containers/podman/blob/main/docs/tutorials/basic_networking.md * https://github.com/containers/podman/blob/main/docs/tutorials/basic_networking.md
-* https://www.n0tes.fr/2024/01/06/Podman-Gestion-reseau/+* https://www.n0tes.fr/categories/Conteneurisation/Podman/
 * https://docs.oracle.com/en/operating-systems/oracle-linux/podman/podman-ConfiguringNetworkingforPodman.html#configuring-podman-networking * https://docs.oracle.com/en/operating-systems/oracle-linux/podman/podman-ConfiguringNetworkingforPodman.html#configuring-podman-networking
 * https://serverfault.com/questions/1131478/how-to-configure-a-podman-container-to-let-it-communicate-with-the-host-as-well * https://serverfault.com/questions/1131478/how-to-configure-a-podman-container-to-let-it-communicate-with-the-host-as-well
Ligne 16: Ligne 19:
 * https://fr.linux-console.net/?p=7480 * https://fr.linux-console.net/?p=7480
 * https://www.redhat.com/en/blog/container-networking-podman * https://www.redhat.com/en/blog/container-networking-podman
 +* https://docs.portainer.io/2.22/start/install-ce/server/podman/linux
 +* https://hpc.llnl.gov/documentation/user-guides/using-containers-lc-hpc-systems/containers-troubleshooting
  
 +Rootless : https://github.com/containers/podman/blob/main/docs/tutorials/rootless_tutorial.md
  
  
-Installez slirp4netns+ 
 +Installez slirp4netns (va être remplacé par **pasta** à partir de Podman 5)
 ~~~bash ~~~bash
 apt-get install slirp4netns apt-get install slirp4netns
Ligne 33: Ligne 40:
 Cette commande permet d'utiliser les espaces de noms réseau sans être root. Cette commande permet d'utiliser les espaces de noms réseau sans être root.
  
 +
 +
 +## Conf registry
 +
 +''/etc/containers/registries.conf''
 +~~~ini
 +[registries.search]
 +registries = ['docker.io', 'quay.io', 'ghcr.io']
 +
 +[registries.insecure]
 +registries = []
 +~~~
  
  
Ligne 44: Ligne 63:
 ~~~ ~~~
  
 +
 +Contener - entrypoint
 +~~~
 +$ podman run --entrypoint /usr/bin/echo -ti --rm debian -e 'Test1\nTest2'
 +Test1
 +Test2
 +~~~
  
  
 ~~~bash ~~~bash
-podman generate systemd --restart-policy=always -t 1 dokuwiki1+#podman generate systemd --restart-policy=always -t 1 dokuwiki1 
 +#podman generate systemd --restart=always -t 1 dokuwiki1 
 # podman generate systemd --new --files --name httpd # podman generate systemd --new --files --name httpd
 # quadlet ? # quadlet ?
Ligne 53: Ligne 81:
  
  
-Autte+Autre
 ~~~bash ~~~bash
 echo 1 > /proc/sys/kernel/unprivileged_userns_clone echo 1 > /proc/sys/kernel/unprivileged_userns_clone
 +~~~
 +
 +
 +## Conf UIDMAP
 +
 +| Colonne | Description                                                   |
 +| ------- | ------------------------------------------------------------- |
 +|       1 | Nom de l'utilisateur système sur le hôte                      |
 +|       2 | Numéro d'UID sur le hôte correspondant à l'UID 0 du NS        |
 +|       3 | Plage; notre d'UID à l'intérieur du NS                        |
 +
 +
 +''/etc/subuid''
 +~~~
 +jean:100000:65536
 +test:165536:65536
 +plop:231072:65536
 +k8s:296608:65536
 +~~~
 +
 +''/etc/subgid''
 +~~~
 +jean:100000:65536
 +test:165536:65536
 +plop:231072:65536
 +k8s:296608:65536
 ~~~ ~~~
  
Ligne 104: Ligne 158:
  
  
-La commande podman network inspect affiche les informations sur un réseau spécifique +La commande ''podman network inspect'' affiche les informations sur un réseau spécifique  
 + 
 + 
 + 
 +La commande ''podman run --network'' permet d’ajouter le réseau DNS db_network à un nouveau conteneur 
 + 
 + 
 + 
 +Re appliquer les règles réseau Podman 
 +~~~bash 
 +podman network reload  
 +~~~ 
 + 
 +Avant cette commande il faillait faire un restart des containers. 
 + 
 + 
 +A common problem is that reloading the firewall deletes the netavark iptables rules resulting in a loss of network connectivity for rootful containers. 
 + 
 + 
 + 
  
tech/notes_podman.1743360829.txt.gz · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki