Se desplegará un simple servidor NGINX en un contenedor.
Ejecutemos una imagen estandar de nginx en background redirigiento el puerto 80 del contenedor docker al 8000 que será requerido externamente.
bext@bext-VPCF13WFX:~/DockerAppConfig$ docker run -d -p 8000:80 nginx
Unable to find image 'nginx:latest' locally
latest: Pulling from library/nginx
fc7181108d40: Pull complete
c4277fc40ec2: Pull complete
780053e98559: Pull complete
Digest: sha256:bdbf36b7f1f77ffe7bd2a32e59235dff6ecf131e3b6b5b96061c652f30685f3a
Status: Downloaded newer image for nginx:latest
09ba804abcebb8598c5760ccafa178b87d7f4510b57b976b15e5a0cd194007bc
bext@bext-VPCF13WFX:~/DockerAppConfig$
Podemos el proceso corriendo con ctop y algunos de sus detalles.
Y por supuesto la página.
Desde linea de comandos podemos ver su proceso, su imagen.
bext@bext-VPCF13WFX:~/DockerAppConfig$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
09ba804abceb nginx "nginx -g 'daemon of…" 5 minutes ago Up 5 minutes 0.0.0.0:8000->80/tcp stoic_euler
bext@bext-VPCF13WFX:~/DockerAppConfig$
bext@bext-VPCF13WFX:~/DockerAppConfig$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx latest 719cd2e3ed04 6 days ago 109MB
k8s.gcr.io/kube-proxy v1.14.3 004666307c5b 11 days ago 82.1MB
k8s.gcr.io/kube-apiserver v1.14.3 9946f563237c 11 days ago 210MB
k8s.gcr.io/kube-controller-manager v1.14.3 ac2ce44462bc 11 days ago 158MB
k8s.gcr.io/kube-scheduler v1.14.3 953364a3ae7a 11 days ago 81.6MB
quay.io/coreos/flannel v0.11.0-amd64 ff281650a721 4 months ago 52.6MB
k8s.gcr.io/coredns 1.3.1 eb516548c180 5 months ago 40.3MB
k8s.gcr.io/kubernetes-dashboard-amd64 v1.10.1 f9aed6605b81 6 months ago 122MB
k8s.gcr.io/etcd 3.3.10 2c4adeb21b4f 6 months ago 258MB
k8s.gcr.io/pause 3.1 da86e6ba6ca1 18 months ago 742kB
bext@bext-VPCF13WFX:~/DockerAppConfig$
Detengamos el proceso, para poderlo borrar y luego eliminar su imagen.
bext@bext-VPCF13WFX:~/DockerAppConfig$ docker stop 09ba804abceb
09ba804abceb
bext@bext-VPCF13WFX:~/DockerAppConfig$ docker rm 09ba804abceb
09ba804abceb
bext@bext-VPCF13WFX:~/DockerAppConfig$ docker rmi -f 719cd2e3ed04
Untagged: nginx:latest
Untagged: nginx@sha256:bdbf36b7f1f77ffe7bd2a32e59235dff6ecf131e3b6b5b96061c652f30685f3a
Deleted: sha256:719cd2e3ed04781b11ed372ec8d712fac66d5b60a6fb6190bf76b7d18cb50105
Deleted: sha256:e9b6506fb887de50972aefd99d7c5eb56b1a8e757ed953cdfecb86b5359bcb22
Deleted: sha256:55d9d9692a9615a28d183a42bc3881a72a39393feba3664e669e7affb78daa76
Deleted: sha256:cf5b3c6798f77b1f78bf4e297b27cfa5b6caa982f04caeb5de7d13c255fd7a1e
No hay comentarios:
Publicar un comentario