Diferencia entre revisiones de «Operando con las imagenes»

De Wiki de EGC
Saltar a: navegación, buscar
(Página creada con «Puedo borrar una imagen de mi repositorio local en cualquier momento: # docker image rm -f hello-world Untagged: hello-world:latest Untagged: hello-world@sha256:1f19634d26...»)
 
 
Línea 1: Línea 1:
 
Puedo borrar una imagen de mi repositorio local en cualquier momento:
 
Puedo borrar una imagen de mi repositorio local en cualquier momento:
  
 +
<syntaxhighlight lang="sh">
 
# docker image rm -f hello-world
 
# docker image rm -f hello-world
 
Untagged: hello-world:latest
 
Untagged: hello-world:latest
 
Untagged: hello-world@sha256:1f19634d26995c320618d94e6f29c09c6589d5df3c063287a00e6de8458f8242
 
Untagged: hello-world@sha256:1f19634d26995c320618d94e6f29c09c6589d5df3c063287a00e6de8458f8242
 
Deleted: sha256:05a3bd381fc2470695a35f230afefd7bf978b566253199c4ae5cc96fafa29b37
 
Deleted: sha256:05a3bd381fc2470695a35f230afefd7bf978b566253199c4ae5cc96fafa29b37
 +
</syntaxhighlight>
  
 
Comprobamos que ya no esta:
 
Comprobamos que ya no esta:
  
 +
<syntaxhighlight lang="sh">
 
# docker images
 
# docker images
 
REPOSITORY          TAG                IMAGE ID            CREATED            SIZE
 
REPOSITORY          TAG                IMAGE ID            CREATED            SIZE
 +
</syntaxhighlight>
  
 
Puedo volver a descargarla del repositorio principal de docker:
 
Puedo volver a descargarla del repositorio principal de docker:
  
 +
<syntaxhighlight lang="sh">
 
# docker pull hello-world
 
# docker pull hello-world
 
Using default tag: latest
 
Using default tag: latest
Línea 19: Línea 24:
 
Digest: sha256:07d5f7800dfe37b8c2196c7b1c524c33808ce2e0f74e7aa00e603295ca9a0972
 
Digest: sha256:07d5f7800dfe37b8c2196c7b1c524c33808ce2e0f74e7aa00e603295ca9a0972
 
Status: Downloaded newer image for hello-world:latest
 
Status: Downloaded newer image for hello-world:latest
 +
</syntaxhighlight>
  
 +
Volvemos a comprobar y efectivamente si aparece:
 +
 +
<syntaxhighlight lang="sh">
 
# docker images
 
# docker images
 
REPOSITORY          TAG                IMAGE ID            CREATED            SIZE
 
REPOSITORY          TAG                IMAGE ID            CREATED            SIZE
 
hello-world        latest              05a3bd381fc2        6 weeks ago        1.84kB
 
hello-world        latest              05a3bd381fc2        6 weeks ago        1.84kB
 +
</syntaxhighlight>

Revisión actual del 16:21 26 oct 2017

Puedo borrar una imagen de mi repositorio local en cualquier momento:

# docker image rm -f hello-world
Untagged: hello-world:latest
Untagged: hello-world@sha256:1f19634d26995c320618d94e6f29c09c6589d5df3c063287a00e6de8458f8242
Deleted: sha256:05a3bd381fc2470695a35f230afefd7bf978b566253199c4ae5cc96fafa29b37

Comprobamos que ya no esta:

# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE

Puedo volver a descargarla del repositorio principal de docker:

# docker pull hello-world
Using default tag: latest
latest: Pulling from library/hello-world
5b0f327be733: Already exists 
Digest: sha256:07d5f7800dfe37b8c2196c7b1c524c33808ce2e0f74e7aa00e603295ca9a0972
Status: Downloaded newer image for hello-world:latest

Volvemos a comprobar y efectivamente si aparece:

# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
hello-world         latest              05a3bd381fc2        6 weeks ago         1.84kB