Published on March 14, 2014
Docker Training Docker Austin Meetup March 13, 2014
Basic concepts Docker - Not a replacement to LXC Namespaces: ● First level of isolation ● Process running in a container cannot see or affect other processes running outside the container Control Groups: ● Key Component of LXC ● Resource Accounting and Limiting are the key functions. ● Significant to multi-tenant platforms: Guarantees consistent uptime and performance
LXCs LXCs are lightweight . Run multiple isolated instances on the same host Share a single kernel, but can have a set definition for the number of resources they can consume. Does not allow interference among instances.
Docker Terminology Docker Registry: is a registry server for Docker that helps hosting and delivery of repositories and images Layer: Each file system that is stacked when Docker mounts rootfs Image: is a read-only layer that never changes Container: Self-contained environment built using one or more images. Images can be created based on the committed containers Repository: Set of images on local Docker or Registry server
Docker Files Dockerfiles allow describing build steps once and later build a container automatically from source Can be viewed as an image representation Helps ● Build images easily ● Automates and scripts image creation
Install Docker (Ubuntu 13.10) Add Docker repository to local keychain: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 Add Docker repo to apt source list, update and install lcx-docker package sudo sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" sudo apt-get update sudo apt-get install lxc-docker Verify Installation sudo docker run -i -t ubuntu /bin/bash
docker pull ubuntu: precise docker pull ubuntu:12.04Command: Pull Ubuntu 12.04 LTS Precise Base Image Purpose:
docker run Choose a mode to run the Docker container run background/ detached run run foreground run interactive 1. Container does not listen 2. IO is done through Network or sharing 1. Default Mode 2. Attaches console to the process’s stdin, stdout, stderr 1. Persistent standard input needed
docker run (background) -d=true: or -dCommand/ Options: Run container in the background, print new container id Purpose:
docker run (foreground) -d=false: Command/ Options: Start the process in the container also acts as the TTY Purpose: -a= : Attach to stdin, stdout and/or stderr -t=false : pseudo-tty -i=false : stdin open even if not attached Other Options:
docker run (interactive) use -i and -t togetherCommand/ Options:
docker run ssh # sshd # # VERSION 0.0.1 FROM ubuntu MAINTAINER Thatcher R. Peskens "email@example.com" # make sure the package repository is up to date RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list RUN apt-get update RUN apt-get install -y openssh-server RUN mkdir /var/run/sshd RUN echo 'root:screencast' |chpasswd EXPOSE 22 CMD /usr/sbin/sshd -D Dockerfile to set up an sshd service in a container
docker run (port forwarding) docker run -P <imageid>Command: docker run -p [([<host_interface>: [host_port]])|(<host_port>):] <container_port>[/udp] <image> <cmd> Command: Auto-map all exposed ports to host: Binding a port to a host interface
docker run (volume sharing) Command: docker run -v /var/volume1 -v /var/volume2 DATA busybox true Create container with 2 volumes Mount Data volumes into application container Command: docker run -t -i -rm -volumes- from DATA -name client1 ubuntu bash
docker diff docker diff CONTAINERCommand: List the changes in files and directories in a container’s filesystem Purpose:
docker inspect docker inspect CONTAINER|IMAGE [CONTAINER|IMAGE...] Command: Return low-level information as JSON arrays Purpose:
docker build docker build [OPTIONS] PATH | URL | -Command: Use the source code at PATH to build a new container image Purpose:
docker commit docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]] Command: Use the container’s changes to create a new image Purpose:
docker push docker push NAMECommand: Push a container or image to the registryPurpose:
Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...
In this presentation we will describe our experience developing with a highly dyna...
Presentation to the LITA Forum 7th November 2014 Albuquerque, NM
Un recorrido por los cambios que nos generará el wearabletech en el futuro
Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...
1. Docker Training Docker Austin Meetup March 13, 2014 . 2. Basic concepts Docker - Not a replacement to LXC Namespaces: First level of isolation ...
... Paris Docker Meetup Sep 08, 2014 Technology docker. ... US • March 27, 2013 Docker 0.1 ... Docker Training Course - Docker Austin meetup ...
... Docker Online meetup #13 Docker Machine ... Docker Meetup at Rackspace (Austin ... our Training course sessions Join the Docker ...
13 May. 2014. Winning Strategies ... we will provide Docker training to show them how they can build, ... consists of two days of training (March 8 and 9 ...
2014 events. Red Hat employees ... Austin, TX Friday 13 June 2014 – Saturday 14 ... More information is available at http://www.meetup.com/docker ...
... we will provide Docker training to show them how they can build, ... consists of two days of training (March 8 and 9 both days from 9 a.m. ... 13 Nov ...
... March 13-17 ($1295) Container Days Austin, Friday evening March 27 and Saturday March 28 ($60), for docker, ... Interactive is here of course on March ...