Your SlideShare is downloading. ×
  • Like
Introducing Docker
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Introducing Docker

  • 508 views
Published

These are the slides I used in my local libre user group meetup to introduce Docker to my friends and users from varied backgrounds.

These are the slides I used in my local libre user group meetup to introduce Docker to my friends and users from varied backgrounds.

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
508
On SlideShare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
19
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Docker Dec 2013 www.anubhaskar.name Creative Commons Attribution-ShareAlike 3.0 Unported License.
  • 2. AGENDA 1.Introduction 2.Prototype Architecture 3.Prerequisites 4.Install & configure Docker 5.Install & configure Docker private registry 6.Register container image 7.Create container in first host 8.Create container in second host 2 Creative Commons Attribution-ShareAlike 3.0 Unported License.
  • 3. Introduction Docker is ● ● ● ● An Open source software Based on Linux container technology (LXC) Configure once...run anywhere approach Used to deploy application in a self contained lightweight and isolated Linux container 3 Creative Commons Attribution-ShareAlike 3.0 Unported License.
  • 4. Prototype Architecture repo 10.10.10.2/Centos (centos docker image downloaded from Internet) dockerreg 10.10.10.3/Centos Private Image Repository dockerhost1 10.10.10.4/Centos dockerhost2 10.10.10.5/Ubuntu Container1 Container2 4 Creative Commons Attribution-ShareAlike 3.0 Unported License.
  • 5. Prerequisites For simplicity and ease of demonstration below changes are made in prototype. These options should be avoided or carefully considered in a production deployment 1. Two hosts are installed with Centos6.3 minimal install cd. 2. Disable SELinux on two hosts # vi /etc/selinux/config SELINUX=disabled 3. Disable firewall on two hosts # chkconfig iptables off 4. Add host names # vi /etc/hosts 10.10.10.2 repo 10.10.10.3 dockerreg 10.10.10.4 dockerhost1 10.10.10.5 dockerhost2 Creative Commons Attribution-ShareAlike 3.0 Unported License. 5
  • 6. Prerequisites 5. Reboot server and client hosts 6. Third host is installed with Ubuntu12.04 server 6 Creative Commons Attribution-ShareAlike 3.0 Unported License.
  • 7. Install & configure Docker 1. Install docker in centos hosts repo, dockerhost1 # yum install docker-io Note: Epel repository should be enabled for docker rpm 2. Start docker service in docker-registry host # service docker start 3. Install docker in ubuntu host dockerhost2 # echo “deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list # apt-get update # apt-get install lxc-docker 7 Creative Commons Attribution-ShareAlike 3.0 Unported License.
  • 8. Install & configure Docker private registry 1. Install docker's private registry software in host dockerreg # yum install docker-registry Note: Epel testing repository should be enabled for docker-registry rpm 2. Start docker-registry service in docker-registry host # service redis start # service docker-registry start 8 Creative Commons Attribution-ShareAlike 3.0 Unported License.
  • 9. Register container image 1. Download centos container image from central repository (index.docker.io) in host repo. # docker pull centos 2. View the downloaded image details # docker images 3. Upload the image to local private registry # docker tag centos dockerreg:5000/os # docker push dockerreg:5000/os 9 Creative Commons Attribution-ShareAlike 3.0 Unported License.
  • 10. Create container in first host 1. Start container in dockerhost1 # docker run -i -t dockerreg:5000/os /bin/bash 2. Install Apache inside container [container]# yum install httpd [container]# service httpd start [container]# netstat -ntlp [container]# exit 3. Save the container with Apache as new image # docker ps -a # docker commit <container id from above cmd> osweb 4. Upload new image to private registry # docker tag osweb 10.10.10.3:5000/osweb # docker push 10.10.10.3:5000/osweb 10 Creative Commons Attribution-ShareAlike 3.0 Unported License.
  • 11. Create container in second host 1. Start container in dockerhost2 # docker run -i -t dockerreg:5000/osweb /bin/bash 11 Creative Commons Attribution-ShareAlike 3.0 Unported License.
  • 12. THANK YOU 12 Creative Commons Attribution-ShareAlike 3.0 Unported License.