Skip to content

Latest commit

 

History

History
151 lines (116 loc) · 6.38 KB

index.org

File metadata and controls

151 lines (116 loc) · 6.38 KB

Docker y un sandbox Node.js

Historia

./img/historia.jpg historia

./img/xenserver.jpg tecnovar

cgroups

cgroups (a backronym for control groups) is a Linux kernel feature to limit, account, and isolate resource usage (CPU, memory, disk I/O, etc.) of process groups. This work was started by engineers at Google (primarily Paul Menage and Rohit Seth) in 2006 under the name “process containers”. In late 2007, it was renamed to “Control Groups” due to the confusion caused by multiple meanings of the term “container” in the Linux kernel, and merged into kernel version 2.6.24. Since then, many new features and controllers have been added, such as support for kernfs, firewalling, and the introduction of a unified hierarchy. – Wikipedia

./img/lxc-docker.png lxc-docker

LXC

LXC is a userspace interface for the Linux kernel containment features. Through a powerful API and simple tools, it lets Linux users easily create and manage system or application containers. – LXC

./img/lxc.png lxc

Docker

An open platform for distributed applications for developers and sysadmins. – Docker

./img/cafe_docker.jpg referencia_cafe_docker

Docker

Imagenes

  • Dockerfile
docker pull dockerfile/nodejs

Contenedores

CONTAINER ID        IMAGE                      COMMAND             CREATED             STATUS                      PORTS      NAMES
f26fc8e8cc87        dockerfile/nodejs:latest   "bash"              20 minutes ago      Up 20 minutes                          distracted_goodall
6fcb80eb5da1        dockerfile/nodejs:latest   "node"              40 hours ago        Exited (143) 39 hours ago              cocky_heisenberg
9c44e3678af4        dockerfile/nodejs:latest   "bash"              40 hours ago        Exited (0) 40 hours ago                insane_turing
a59309ff89ec        krahser/ansible:latest     "/sbin/my_init"     10 days ago         Exited (-1) 47 hours ago               silly_tesla   
                                                                                                                                                    
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
dockerfile/nodejs   latest              c45639f061da        3 days ago          496.3 MB
krahser/ansible     latest              8d159d3a1aa3        5 weeks ago         325 MB
phusion/baseimage   0.9.15              cf39b476aeec        10 weeks ago        289 MB
debian              stable              802059b8f0ea        11 weeks ago        85.19 MB

Algunas experiencias

#   -i, --interactive=false    Keep STDIN open even if not attached
#   -h, --hostname=""          Container host name
#   -t, --tty=false            Allocate a pseudo-TTY
#   -P, --publish-all=false    Publish all exposed ports to the host interfaces
#   -p, --publish=[]           Publish a container's port to the host
                               format: ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort | containerPort
                               (use 'docker port' to see the actual mapping)

docker run -i -t -p 127.0.0.1:7025:25 <Imagen> <proceso>
  • Carpetas compartidas
#   --name=""                  Assign a name to the container
#   -v, --volume=[]            Bind mount a volume (e.g., from the host: -v /host:/container, from Docker: -v /container)
#   --volumes-from=[]          Mount volumes from the specified container(s)

docker run  -v <path_compartido>:<path_container> <Imagen> <proceso>

Nodejs

[Demo]

Referencias

Preguntas?

./img/Light-Pipes-Channel-Sunlight-Just-Like-Water-Pipes-Channel-Water-2.jpg

Hasta prontoo

  • Gracias!
  • KrahserAldo María Vizcaino
  • aldo.vizcaino87 [at] gmail [dot] com

referencia_cafe_docker https://www.flickr.com/photos/yukop/11941236015/ historia http://upload.wikimedia.org/wikipedia/commons/3/3a/1878_Adams_Monumental_Illustrated_Panorama_of_History_-_Geographicus_-_WorldHistory-adams-1871.jpg tecnovar http://tecnoav.com/wp-content/uploads/2014/02/xenserver.jpg [fn:lxc-docker} http://www.infoq.com/resource/news/2014/03/docker_0_9/en/resources/1docker-execdriver-diagram.png lxc http://i.stack.imgur.com/F837U.png docker-background http://core0.staticworld.net/images/article/2014/09/docker-100432103-primary.idge.jpg dibujemos https://github.com/buritica/dibujemos