Upload
mohammadreza-amini
View
831
Download
0
Embed Size (px)
Citation preview
Autumn 2015IRAN OpenStack Users Group
Ian Ashley Murdock
(28 April 1973 – 28 December 2015)
was a German-born American
software engineer, known
for being the founder of the
Debian project and
Progeny Linux Systems,
a commercial Linux company.
Presentation By:Mohammadreza Amini
Amir Arsalan
Autumn 2015IRAN OpenStack Users Group
Review(Docker)Version Modified
Review
● What is Container?
● What is Docker?
● Docker Architecture
● Cgroups,File system,Network
● Install docker(Linux,Mac,Windows)
● Docker vs Vms, Docker vs lxc
● Docker(Engine,Hub,Machine,Compose)
● Docker Allocating resource & Limitation Container
Agenda
Review (Docker)
| Iran Community OpenStack.ir
Review (Docker)
| Iran Community OpenStack.ir
Group of processes contained in a Isolated Environment
Isolation provided by Concepts like cgroups and namespaces
What is Container?
Review (Docker)
| Iran Community OpenStack.ir
A Docker Container looks like a
Vritual machine
A Docker Container looks like a
Vritual machine
Linux OS isolationTools made easy
Linux OS isolationTools made easy
Provide additioonalGoodies for app
development
Provide additioonalGoodies for app
development
Review (Docker)
| Iran Community OpenStack.ir
Requirements
Mac OS:
Your Mac must be running OS X 10.8 “Mountain Lion” or newer
Windows:
Your machine must be running Windows 7.1, 8/8.1 or newer to run
Docker. Windows 10 is not currently supported.
Linux:
Docker requires a 64-bit installation regardless of your Ubuntu
version. Additionally, your kernel must be 3.10 at minimum. The
latest 3.10 minor version or a newer maintained version are also
acceptable.
Review (Docker)
| Iran Community OpenStack.ir
Docker Hub
The Docker Hub is a cloud-based registry service for building and shipping
application or service containers.
http://www.hub.docker.com
Review (Docker)
| Iran Community OpenStack.ir
Docker Machine
To get started with Docker, first you
need to setup a Docker Engine. Docker
Machine automatically sets up Docker
on your computer, on cloud providers,
and inside your data center. Docker
Machine provisions the hosts, installs
Docker Engine on them, and then
configures the Docker client to talk to
the Docker Engines
Review (Docker)
| Iran Community OpenStack.ir
Docker compose
Running multiple container with Docker Compose
monosrv: &monoservice
extends:
file: common.yml
service: mono
volumes:
- .:/src
- /var/Project:/var/Project
ports:
- 7101:9000
external_links:
- service_nsqd_1:nsqd
Review (Docker)
| Iran Community OpenStack.ir
Allocation of resources to containers is especially important as containers are lessisolated than virtual machines.
A single runaway container can lead to performance issues and degradationacross the entire host.
In Hypervisors, VMs are normally allocated a fixed amount of CPU resources, RAM,and disk space, meaning that the applications will work within those set limits nomatter the load to which the VM or application is subjected.
Review (Docker)
| Iran Community OpenStack.ir
Each container is assigned a “share” of the CPU, set to 1024 by default. By itself,1024 CPU share does not mean anything.
If there is only a single container running, then it can use all the available CPUresources.
However, if you launch another container and both containers have 1024 CPUshare, then each container can claim at least 50% of the CPU resources.
Memory & Memory swap
Disk space and read/write speed can be limited in Docker. By default, read/writespeed is unlimited. However, if required, it can be limited as needed using cgroups.Each container is allocated 10GB of space by default.
Review (Docker)
| Iran Community OpenStack.ir
By default, Docker containers are “unprivileged” and cannot, for example, run a Docker daemon inside a Docker container. This is because by default a container is not allowed to access any devices, but a “privileged” container is given access to all devices
If you want to limit access to a specific device or devices you can use the --deviceflag. It allows you to specify one or more devices that will be accessible within thecontainer.
Review (Docker)
| Iran Community OpenStack.ir
Stay in Touch and Join Us:
● Home Page: OpenStack.ir
● Meetup age: Meetup.com/IranOpenStack
● Mailing List: [email protected]
● Twitter: @OpenStackIR , #OpenStackIRAN
● IRC Channel on FreeNode: #OpenStack-ir
● Telegram Channel: @Docker_ir
Review (Docker)
| Iran Community OpenStack.ir
Mohammadreza Amini
Linux Administrator
Amir Arsalan
Python Developer
Thank You