Logo Yunt
Infra, Ops & WorkflowAttention9393/100

Yunt Docker Containers

Manipuler les conteneurs Docker (Yunt Academy) : docker run, cycle de vie, logs, exec, inspect, stop/rm, ports et variables d’environnement. À utiliser pour démarrer, inspecter, déboguer ou nettoyer des conteneurs en CLI.

ou envoie-le directement à ton agent.

Installer dans ton projet

$ curl -fsSL https://arboristhree.xyz/cli/install-skill.mjs -o /tmp/arboris-install-skill.mjs && node /tmp/arboris-install-skill.mjs yunt-docker-containers
Logo Yunt
Yunt
academy.yunt.fr
Contenu à copier
---
name: yunt-docker-containers
description: >
  Manipuler les conteneurs Docker (Yunt Academy) : docker run, cycle de vie,
  logs, exec, inspect, stop/rm, ports et variables d’environnement. À utiliser
  pour démarrer, inspecter, déboguer ou nettoyer des conteneurs en CLI.
metadata:
  origin: Yunt
  course: Conteneuriser ses projets web avec Docker
  source: https://academy.yunt.fr/dashboard/catalogue
---

# Yunt — Manipuler les conteneurs

Compétences du cours Yunt Academy (chapitre *Manipuler les conteneurs*), condensées pour un agent.

## When to Activate

- Lancer un conteneur avec ports, env, redémarrage, nom
- Lire les logs, entrer dans un conteneur (`exec`), inspecter la config
- Arrêter / supprimer / lister conteneurs
- Comprendre pourquoi un conteneur « disparaît » ou redémarre en boucle

## When not to use

- Install / concepts → `yunt-docker-fundamentals`
- Build d’image / Dockerfile → `yunt-docker-images-build`
- Persistance ou réseau multi-conteneurs → skills volumes/réseaux / Compose

## Cycle de vie

`create` → `start` → `running` → `stop` / `kill` → `rm`

`docker run` = create + start. Sans `-d`, le terminal suit le processus principal ; avec `-d`, détaché.

## Commandes clés

```bash
# Lancer (exemple nginx)
docker run -d --name web -p 8080:80 nginx:alpine

# Lister
docker ps          # en cours
docker ps -a       # tous

# Logs / shell / inspect
docker logs -f web
docker exec -it web sh
docker inspect web

# Arrêt / suppression
docker stop web
docker rm web
docker rm -f web   # force

# Nettoyage
docker container prune
```

### Options `run` utiles

| Option | Rôle |
| --- | --- |
| `-d` | Détaché |
| `--name` | Nom stable |
| `-p hôte:conteneur` | Publication de port |
| `-e KEY=val` / `--env-file` | Variables d’environnement |
| `--rm` | Supprime à l’arrêt |
| `--restart unless-stopped` | Politique de redémarrage |
| `-v` / `--mount` | Persistance (détails → skill volumes) |

## Méthodologie de debug

1. `docker ps -a` — état et code de sortie.
2. `docker logs` — erreur applicative.
3. `docker inspect` — ports, env, montages, réseau.
4. `docker exec` — vérifier depuis l’intérieur si le process tourne encore.
5. Recréer avec `--rm` et options explicites plutôt que « patcher » un conteneur opaque.

## Attribution

Contenu pédagogique condensé avec autorisation du créateur — Yunt Academy.
Colle ce Markdown dans ton agent ou utilise les boutons ci-dessus pour l’écrire dans ton projet.

Ce que fait Yunt Docker Containers

Lancer un conteneur avec ports, env, redémarrage, nom
Lire les logs, entrer dans un conteneur (`exec`), inspecter la config
Arrêter / supprimer / lister conteneurs
Comprendre pourquoi un conteneur « disparaît » ou redémarre en boucle

Comment utiliser Yunt Docker Containers

1
Copie le prompt
Un clic copie le prompt packagé (ou l'envoie à ton agent).
2
L'agent installe le skill
Il ajoute le SKILL.md et ses ressources à ton projet.
3
Activation automatique
Le skill s'active dès que le contexte correspond.

Déclencheurs pour Yunt Docker Containers

Dis simplement à ton agent quelque chose comme :

Applique le skill yunt-docker-containers à cette tâche
Utilise yunt-docker-containers pour améliorer cette implémentation
Passe en revue ce sujet avec yunt-docker-containers

Skills liés à Yunt Docker Containers

Add CLI Command (.NET)
Add or change a dotnet CLI command, subcommand, or option across the relevant CLI projects. USE FOR: adding or changing a dotnet CLI command/subcommand, adding a new Option<T> or Argument<T>, registering a subcommand in the command tree, changing an option's help description or a command's runtime message, wiring a command parser, or updating --help output.
Add Dotnet Aot Command (.NET)
Add, enable, or review a dotnet CLI command or feature in the Native AOT CLI (src/Cli/dotnet-aot) and prove its compatibility. USE FOR: migrating a command or option to AOT, reviewing an AOT migration PR, defining conservative eligibility and managed fallback, changing AotSourceFiles.props or AotDependencies.props, validating AOT/managed parity, NativeAOT-publishing tests, checking binary-size impact, or using the dn harness and separated SDK layout. DO NOT USE FOR: resolving IL trim/AOT analyzer warnings alone (use dotnet-aot-compat), running dotnet.Tests incrementally (use incremental-test), or pure managed CLI work.
Add Net Analyzer (.NET)
Add, port, or change a .NET code analysis rule (CA####) under src/Microsoft.CodeAnalysis.NetAnalyzers. USE FOR: implementing a new CA analyzer and its code fixer, porting a rule or PR from the retired dotnet/roslyn-analyzers repo, allocating a diagnostic ID from DiagnosticCategoryAndIdRanges.txt, choosing RuleLevel/severity/category, wiring resx + xlf strings, recording the rule in AnalyzerReleases.Unshipped.md, regenerating the analyzer documentation/sarif files, and writing MSTest analyzer/code-fix tests with the VerifyCS/VerifyVB harness. DO NOT USE FOR: NETSDK#### MSBuild diagnostics (src/Tasks), CS####/BC#### compiler diagnostics or IDE#### analyzers (dotnet/roslyn), or CONTAINER#### diagnostics (src/Containers).