Download - Docker by Demo
-
Docker by Demoby Srikanth Seshachary
-
What is Docker?
-
History of LXC (Linux Containers)
-
cgroups
-
namespaces
-
Docker, a high level API
-
Why do we need Docker?
-
dependencies as versioned code
-
isolation of processes
-
speed
-
debugging
-
pluggability
-
devops a process enforcer
-
devops a tool between rpm, deb and ansible, chef, puppet
-
devops a process enforcer
-
Whats wrong with VMs?
-
speed
-
new vm = minutes,new container = seconds
-
vms = separate kernel,containers = shared kernel (can have different base image)
-
duplicate services (cron, syslog) need to be run for each role
-
Installing Docker
-
only 64-bit supported
-
kernel 3.8
-
sudo yum install docker-iosudo service docker start
-
Downloading (aka pulling) Images
-
$ sudo docker pull ubuntu$ sudo docker images
-
Launching Containers
-
$ sudo docker run -i -t ubuntu /bin/bash$ sudo apt-get install python3$ sudo docker ps$ sudo docker commit image
-
Docker Repositories
-
local private images
-
The Docker Hub
-
Writing Your First Dockerfile
-
# DockerfileFROM ubuntuMAINTAINER James Turnbull "[email protected]"RUN apt-get updateRUN apt-get install -y nginxRUN echo 'Hi, I am in your container' \ >/usr/share/nginx/html/index.htmlEXPOSE 80ENTRYPOINT ["/usr/sbin/nginx"]CMD ["-h"]
-
$ sudo docker build -t="user/nginx" .
$ sudo docker run -t -i user/nginx
$ sudo docker run -t -i user/nginx -g "daemon off;
$ sudo docker port
-
Issues/Limitations/Misconceptions
-
lack of image inheritance composing multiple images (for example, ruby and nginx)
-
yet another tool dockerizing your app takes time
-
not every app can be dockerized
-
you still need configuration management tools like ansible or puppet
-
orchestration isnt avoided either
-
Where do you go from here?
-
the docker book, james turnbull
-
try dockerizing one of your applications
-
Referenceshttp://knitatoms.net/2013/12/benefits-of-docker-for-application-deployment/
https://devopsu.com/blog/docker-misconceptions/
https://stackoverflow.com/questions/16047306/how-is-docker-io-different-from-a-normal-virtual-machine