Voy a lanzar algunos de los comandos típicos en Docker que son necesarios para poder manejarlo correctamente y la respuesta que debe dar.
docker search <image>: Sirve para buscar una imagen en el registro
alberto@ansible-master:~$ docker search ubuntu NAME DESCRIPTION STARS OFFICIAL AUTOMATED ubuntu Ubuntu is a Debian-based Linux operating s... 5878 [OK] rastasheep/ubuntu-sshd Dockerized SSH service, built on top of of... 80 [OK] ubuntu-upstart Upstart is an event-based replacement for ... 71 [OK] ubuntu-debootstrap debootstrap --variant=minbase --components... 30 [OK] torusware/speedus-ubuntu Always updated official Ubuntu docker imag... 27 [OK] nuagebec/ubuntu Simple always updated Ubuntu docker images... 19 [OK] nickistre/ubuntu-lamp LAMP server on Ubuntu 16 [OK] nimmis/ubuntu This is a docker images different LTS vers... 7 [OK] darksheer/ubuntu Base Ubuntu Image -- Updated hourly 2 [OK] admiringworm/ubuntu Base ubuntu images based on the official u... 1 [OK] jordi/ubuntu Ubuntu Base Image 1 [OK] labengine/ubuntu Images base ubuntu 0 [OK] webhippie/ubuntu Docker images for ubuntu 0 [OK] vcatechnology/ubuntu A Ubuntu image that is updated daily 0 [OK] forumi0721ubuntux64/ubuntu-x64-dev ubuntu-x64-dev 0 [OK] datenbetrieb/ubuntu custom flavor of the official ubuntu base ... 0 [OK] konstruktoid/ubuntu Ubuntu base image 0 [OK] forumi0721ubuntuarmhf/ubuntu-armhf-dev ubuntu-armhf-dev 0 [OK] forumi0721ubuntuaarch64/ubuntu-aarch64-dev ubuntu-aarch64-dev 0 [OK] lynxtp/ubuntu https://github.com/lynxtp/docker-ubuntu 0 [OK] teamrock/ubuntu TeamRock's Ubuntu image configured with AW... 0 [OK] forumi0721ubuntux64/ubuntu-x64-dev-armbian ubuntu-x64-dev-armbian 0 [OK] forumi0721ubuntux64/ubuntu-x64-dev-android ubuntu-x64-dev-android 0 [OK] esycat/ubuntu Ubuntu LTS 0 [OK] smartentry/ubuntu ubuntu with smartentry 0 [OK]
docker pull <image>: descarga una imagen del registro a la maquina local
alberto@ansible-master:~$ docker pull ubuntu Using default tag: latest latest: Pulling from library/ubuntu c62795f78da9: Pull complete d4fceeeb758e: Pull complete 5c9125a401ae: Pull complete 0062f774e994: Pull complete 6b33fd031fac: Pull complete Digest: sha256:c2bbf50d276508d73dd865cda7b4ee9b5243f2648647d21e3a471dd3cc4209a0 Status: Downloaded newer image for ubuntu:latest
docker images: muestra las imagenes docker disponibles en la maquina local
alberto@ansible-master:~$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE ubuntu latest 6a2f32de169d 5 days ago 117.2 MB hello-world latest 48b5124b2768 3 months ago 1.84 kB alberto@ansible-master:~$
docker run -i -t <image>: permite lanzar un contenedor basado en una imagen existente.
Si la imagen no existe se la descarga del registro.
-t flag asigna un terminal dentro del contenedor.
-i flag permite una conexión interactiva.
También se puede correr como: docker run -it <image>
alberto@ansible-master:~$ docker run -i -t ubuntu /bin/bash root@75d9945fad6b:/# uname -a Linux 8ff6b99beccb 4.4.0-66-generic #87-Ubuntu SMP Fri Mar 3 15:29:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
docker ps: permite ver los procesos que estan corriendo actualmente dentro de los diferentes contenedores
alberto@ansible-master:~$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 9c0b81da7c9b ubuntu "/bin/bash" 14 seconds ago Up 13 seconds ecstatic_swartz
Hasta la próxima!
So, what do you think ?