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/10/01 21:56] – 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:// | ||
| + | Django: Mise en place de l’HTTPS via Nginx | ||
| + | * https:// | ||
| + | |||
| + | Mise en production de Django via Docker | ||
| + | * https:// | ||
| Docker et sécurité : | Docker et sécurité : | ||
| * https:// | * https:// | ||
| - | * [[https:// | ||
| Ligne 86: | Ligne 91: | ||
| <code ini> | <code ini> | ||
| [Service] | [Service] | ||
| - | Environment = " | + | # Environment = " |
| + | Environment = " | ||
| </ | </ | ||
| Ligne 107: | Ligne 113: | ||
| Voir : | Voir : | ||
| + | * https:// | ||
| * https:// | * https:// | ||
| * https:// | * https:// | ||
| Ligne 116: | Ligne 123: | ||
| === Droits pour utilisateur non root | === Droits pour utilisateur non root | ||
| + | |||
| Ligne 122: | 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 149: | Ligne 176: | ||
| doesn' | doesn' | ||
| Submounts like / | Submounts like / | ||
| + | |||
| ==== Autres - seccomp | ==== Autres - seccomp | ||
| Ligne 368: | Ligne 396: | ||
| docker load -i <path to image tar file> | docker load -i <path to image tar file> | ||
| </ | </ | ||
| + | |||
| + | |||
| == Debug | == Debug | ||
| Ligne 392: | 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 480: | Ligne 511: | ||
| </ | </ | ||
| - | === Proxy (sous Debian) | + | |
| + | === Proxy | ||
| <code bash> | <code bash> | ||
| - | export | + | export |
| </ | </ | ||
| Ligne 591: | Ligne 623: | ||
| grep CRIT / | grep CRIT / | ||
| </ | </ | ||
| + | |||
| == Notes DNS Bind9 | == Notes DNS Bind9 | ||
| Ligne 669: | 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 677: | 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.1759348613.txt.gz · Dernière modification : de Jean-Baptiste
