| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente |
| docker:accueil [2025/05/24 19:24] – [Docker] add link phsw | docker:accueil [2026/03/16 22:26] (Version actuelle) – add how to get rate-limit current status phsw |
|---|
| * [[https://tbhaxor.com/docker-containers-security/#__do_not_save__|Docker Containers Security]] | * [[https://tbhaxor.com/docker-containers-security/#__do_not_save__|Docker Containers Security]] |
| * [[https://danlevy.net/docker-security-tips-for-self-hosting/|Essential Docker Security Tips for Self-Hosting]] | * [[https://danlevy.net/docker-security-tips-for-self-hosting/|Essential Docker Security Tips for Self-Hosting]] |
| | * [[https://blog.px.dev/container-filesystems/|Where are my container's files? Inspecting container filesystems]] |
| |
| |
| sudo service docker restart | sudo service docker restart |
| </code> | </code> |
| | |
| | |
| | ==== Registry miroir ==== |
| | |
| | * https://docs.docker.com/docker-hub/image-library/mirror/ |
| | * https://hub.docker.com/_/registry |
| | * https://distribution.github.io/distribution/ |
| | |
| | <code bash> |
| | sudo docker run -d -p 5000:5000 -e OTEL_TRACES_EXPORTER=none -e REGISTRY_PROXY_REMOTEURL="https://registry-1.docker.io" -e REGISTRY_LOG_LEVEL=info --restart always --name registry registry:3 |
| | </code> |
| | |
| | Sur les clients, configurer dans ''/etc/docker/daemon.json'' : |
| | <code json> |
| | { |
| | "registry-mirrors": ["http://docker-mirror.homelab:5000"] |
| | } |
| | </code> |
| | |
| | Pour lister les images du registry : |
| | <code bash> |
| | curl http://docker-mirror.homelab:5000/v2/_catalog | jq |
| | </code> |
| | |
| | |
| | ==== Connaître l'état du rate-limit du Docker Hub ==== |
| | |
| | <code bash> |
| | TOKEN=$(curl --silent "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq --raw-output .token) |
| | curl --head --header "Authorization: Bearer $TOKEN" "https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest" 2>&1 | grep --ignore-case RateLimit |
| | </code> |
| | |
| | |
| | ==== Fonctionnement de Docker ==== |
| | |
| | * [[https://muhammadraza.me/2024/building-container-runtime-python/|Understanding Docker Internals: Building a Container Runtime in Python]] |