Docker Training Course - Docker Austin meetup - March 13 2014
Upcoming SlideShare
Loading in...5
×
 

Docker Training Course - Docker Austin meetup - March 13 2014

on

  • 3,735 views

Basic Docker Training

Basic Docker Training

1. Basic Docker Concepts
2. Docker Terminologies
3. Docker Labs - Commands, Purpose and examples

Statistics

Views

Total Views
3,735
Views on SlideShare
1,405
Embed Views
2,330

Actions

Likes
16
Downloads
123
Comments
1

10 Embeds 2,330

http://flux7.com 2026
http://www.scoop.it 199
http://blog.flux7.com 52
http://irrlab.com 40
http://feeds.feedburner.com 4
http://feedly.com 3
http://posts.docker.com 3
http://www.inoreader.com 1
http://www.linkedin.com 1
http://xianguo.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Hi everyone!
    Check out this website guys,
    http://greenycloud.com/

    You can create your own desktop in docker within container.

    Regards,
    Spark
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Docker Training Course - Docker Austin meetup - March 13 2014 Docker Training Course - Docker Austin meetup - March 13 2014 Presentation Transcript

  • 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
  • Docker labs
  • 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 "thatcher@dotcloud.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: