tech:notes_docker
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| tech:notes_docker [2025/06/01 16:19] – Jean-Baptiste | tech:notes_docker [2025/12/05 11:50] (Version actuelle) – Jean-Baptiste | ||
|---|---|---|---|
| Ligne 5: | Ligne 5: | ||
| Voir : | Voir : | ||
| * '' | * '' | ||
| + | * [[Scan de vulnérabilité pour les images de conteneurs]] | ||
| Voir aussi OpenContainers : | Voir aussi OpenContainers : | ||
| Ligne 16: | Ligne 17: | ||
| * https:// | * https:// | ||
| - | Script | + | Django: Mise en place de l’HTTPS via Nginx |
| - | * https://raw.githubusercontent.com/moby/moby/master/contrib/ | + | * https://nextcloud.inrae.fr/s/gtSrdE98Knp7HGf? |
| + | |||
| + | Mise en production de Django via Docker | ||
| + | * https://nextcloud.inrae.fr/ | ||
| Docker et sécurité : | Docker et sécurité : | ||
| * https:// | * https:// | ||
| - | * [[https:// | ||
| Ligne 43: | Ligne 46: | ||
| Vérifier les prérequis : | Vérifier les prérequis : | ||
| + | # https:// | ||
| + | https:// | ||
| + | |||
| - | <code bash> | ||
| - | # | ||
| - | wget https:// | ||
| - | chmod +x check-config.sh | ||
| - | ./ | ||
| - | </ | ||
| Ligne 91: | Ligne 91: | ||
| <code ini> | <code ini> | ||
| [Service] | [Service] | ||
| - | Environment = " | + | # Environment = " |
| + | Environment = " | ||
| </ | </ | ||
| Ligne 112: | Ligne 113: | ||
| Voir : | Voir : | ||
| + | * https:// | ||
| * https:// | * https:// | ||
| * https:// | * https:// | ||
| Ligne 121: | Ligne 123: | ||
| === Droits pour utilisateur non root | === Droits pour utilisateur non root | ||
| + | |||
| Ligne 127: | Ligne 130: | ||
| docker run -ti --privileged -v /:/host debian chroot /host | docker run -ti --privileged -v /:/host debian chroot /host | ||
| docker run -ti --userns=host --privileged -v /:/host debian chroot /host | docker run -ti --userns=host --privileged -v /:/host debian chroot /host | ||
| + | |||
| + | #List images to use one | ||
| + | docker images | ||
| + | #Run the image mounting the host disk and chroot on it | ||
| + | docker run -it -v /:/host/ ubuntu: | ||
| + | |||
| + | # Get full access to the host via ns pid and nsenter cli | ||
| + | docker run -it --rm --pid=host --privileged ubuntu bash | ||
| + | nsenter --target 1 --mount --uts --ipc --net --pid -- bash | ||
| + | |||
| + | # Get full privs in container without --privileged | ||
| + | docker run -it -v /:/host/ --cap-add=ALL --security-opt apparmor=unconfined --security-opt seccomp=unconfined --security-opt label: | ||
| + | |||
| </ | </ | ||
| + | |||
| + | Voir : | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| Voir : http:// | Voir : http:// | ||
| Ligne 143: | Ligne 165: | ||
| * Podman | * Podman | ||
| * kata-containers | * kata-containers | ||
| + | |||
| + | |||
| + | === Droits montage | ||
| + | |||
| + | <code bash> | ||
| + | docker run -v / | ||
| + | </ | ||
| + | |||
| + | |||
| + | doesn' | ||
| + | Submounts like / | ||
| Ligne 363: | Ligne 396: | ||
| docker load -i <path to image tar file> | docker load -i <path to image tar file> | ||
| </ | </ | ||
| + | |||
| + | |||
| == Debug | == Debug | ||
| Ligne 387: | Ligne 422: | ||
| docker run --platform linux/amd64 --publish 8000:8080 ghcr.io/ | docker run --platform linux/amd64 --publish 8000:8080 ghcr.io/ | ||
| </ | </ | ||
| + | |||
| === Notes brouillon | === Notes brouillon | ||
| Ligne 475: | Ligne 511: | ||
| </ | </ | ||
| - | === Proxy (sous Debian) | + | |
| + | === Proxy | ||
| <code bash> | <code bash> | ||
| - | export | + | export |
| </ | </ | ||
| Ligne 586: | Ligne 623: | ||
| grep CRIT / | grep CRIT / | ||
| </ | </ | ||
| + | |||
| == Notes DNS Bind9 | == Notes DNS Bind9 | ||
| Ligne 664: | Ligne 702: | ||
| docker save -o plop.tar.gz acme/jibe | docker save -o plop.tar.gz acme/jibe | ||
| </ | </ | ||
| + | |||
| ==== Notes console TTY | ==== Notes console TTY | ||
| Ligne 672: | Ligne 711: | ||
| If you use -t and -i then Control-C will terminate the container. When using -i with -t then you have to use Control-P Control-Q to detach without terminating. | If you use -t and -i then Control-C will terminate the container. When using -i with -t then you have to use Control-P Control-Q to detach without terminating. | ||
| + | |||
| ==== Notes Haute dispo / Cluster | ==== Notes Haute dispo / Cluster | ||
tech/notes_docker.1748787568.txt.gz · Dernière modification : de Jean-Baptiste
