install.sh : question Docker absent (auto/manuel) via /dev/tty + flags --install-docker/--no-install-docker
This commit is contained in:
1 parent
0744374e3c
commit
1664a8dbeb
2 files changed
+81
-4
No files matched your search
@@ -46,8 +46,34 @@ curl -fsSL .../install.sh | sudo bash -s -- --image git.hilel.fr/hamriou/streamb
|
||||
| `--from-ssh HOST` | `ssh HOST 'docker save …' \| docker load` |
|
||||
| `--image REPO:TAG` | `docker pull` puis tag local |
|
||||
| `--wait N` | attente max du health check (défaut 90 s) |
|
||||
| `--install-docker` | installer Docker automatiquement si absent, sans poser la question |
|
||||
| `--no-install-docker` | ne jamais installer Docker : quitte avec la commande à lancer |
|
||||
| `--dry-run` | affiche les actions sans rien modifier |
|
||||
|
||||
## Docker absent
|
||||
|
||||
Par défaut l'installeur **pose la question** :
|
||||
|
||||
```
|
||||
Docker n'est pas présent sur cette machine.
|
||||
|
||||
1) Installer Docker automatiquement (script officiel get.docker.com)
|
||||
2) Quitter et installer Docker manuellement
|
||||
|
||||
Choix [1/2] :
|
||||
```
|
||||
|
||||
Le choix 1 lance `curl -fsSL https://get.docker.com | sh` puis revérifie le
|
||||
démon et le greffon `compose` ; le choix 2 quitte en affichant la commande.
|
||||
|
||||
Deux détails qui comptent :
|
||||
|
||||
- la question est lue sur **`/dev/tty`**, pas sur stdin — avec `curl … | bash`,
|
||||
stdin contient le script et un `read` naïf consommerait ses octets ;
|
||||
- **sans terminal interactif** (cron, CI, `ssh` sans `-t`), l'installeur ne reste
|
||||
jamais bloqué : il sort avec la commande à lancer. Utilise alors
|
||||
`--install-docker` ou `--no-install-docker` pour trancher à l'avance.
|
||||
|
||||
## Mise à jour
|
||||
|
||||
```bash
|
||||
|
||||
Reference in new issue
Block a user