docker commands
This commit is contained in:
37
docker/007-commands.md
Normal file
37
docker/007-commands.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# Comandi
|
||||
|
||||
## Immagini
|
||||
|
||||
### Ricerca sul registry
|
||||
|
||||
```bash
|
||||
docker search <image_name>
|
||||
|
||||
docker search ubuntu
|
||||
```
|
||||
|
||||
### Scaricare un'immagine
|
||||
|
||||
Per scaricare un'immagine, si utilizza il comando `docker pull`, specificando il nome dell'immagine e, se necessario, il `tag` per una versione specifica. Se il `tag` non è specificato, verrà scaricata l'ultima versione disponibile, indicata come `latest`. È possibile avere più versioni della stessa immagine sullo stesso sistema.
|
||||
|
||||
```bash
|
||||
docker pull <image_name>
|
||||
|
||||
docker pull ubuntu
|
||||
|
||||
docker pull nginx:stable
|
||||
```
|
||||
|
||||
Quando si scarica un'immagine, il terminale mostrerà un output simile al seguente:
|
||||
|
||||
```txt
|
||||
docker pull ubuntu
|
||||
Using default tag: latest
|
||||
latest: Pulling from library/ubuntu
|
||||
`32f112e3802c`: Pull complete
|
||||
Digest: sha256:a08e551cb33850e4740772b38217fc1796a66da2506d312abe51acda354ff061
|
||||
Status: Downloaded newer image for ubuntu:latest
|
||||
docker.io/library/ubuntu:latest
|
||||
```
|
||||
|
||||
Ogni hash rappresenta un layer che compone l'immagine.
|
Reference in New Issue
Block a user