JOSA TechTalk: Introduction to docker
-
Upload
jordan-open-source-association -
Category
Technology
-
view
354 -
download
1
Transcript of JOSA TechTalk: Introduction to docker
Intro to Docker
Aram Yegenian - Systems Admin
● Who should care?● What is the problem?● What is a container?● What is Docker● Docker 101● Docker demo● Docker compose● Docker compose demo
Outline
● Who should care?● What is the problem?● What is a container?● What is Docker● Docker 101● Docker demo● Docker compose● Docker compose demo
Outline
Why developers care?
● Build once... (finally) run anywhere (as long as it is a Linux stack)● A clean, safe, hygienic, portable runtime environment for your app.● No worries about missing dependencies, packages and other pain points during subsequent
deployments.● Run each app in its own isolated container, so you can run various versions of libraries and other
dependencies for each app without worrying.● Automate testing, integration, packaging...anything you can script.● Reduce/eliminate concerns about compatibility on different platforms, either your own or your
customers.● Cheap, zero-penalty containers to deploy services. A VM without the overhead of a VM. Instant
replay and reset of image snapshots.
Why Administrators Care
● Configure once... run anything● Make the entire lifecycle more efficient, consistent, and repeatable● Increase the quality of code produced by developers.● Eliminate inconsistencies between development, test, production, and customer environments.● Support segregation of duties.● Significantly improves the speed and reliability of continuous deployment and continuous
integration systems.● Because the containers are so lightweight, address significant performance, costs, deployment,
and portability issues normally associated with VMs.
CFO, CIO, CTO, ...
● Faster Software Development Lifecycle: Development/Testing/Production● Less overhead● More consolidation● More agility● Reduced cost
● Who should care?● What is the problem?● What is a container?● What is Docker● Docker 101● Docker demo● Docker compose● Docker compose demo
Outline
The Challenge
The Matrix From Hell
Solution: Intermodel Shipping Container
Docker is a shipping container for code
Docker Eliminates the Matrix from Hell
Why it works: Separation of concerns
● Who should care?● What is the problem?● What is a container?● What is Docker● Docker 101● Docker demo● Docker compose● Docker compose demo
Outline
Linux containers
Operating-system-level virtualization is a server-virtualization method where the kernel of an operating system allows for multiple isolated user-space instances, instead of just one.
On Unix-like operating systems, one can see this technology as an advanced implementation of the standard chroot mechanism.
● Who should care?● What is the problem?● What is a container?● What is Docker● Docker 101● Docker demo● Docker compose● Docker compose demo
Outline
What is Docker?
Docker is an open-source project that automates the deployment of applications inside software containers, by providing an additional layer of abstraction and automation of operating-system-level virtualization on Linux.
Docker uses resource isolation features of the Linux kernel such as cgroups and kernel namespaces to allow independent "containers" to run within a single Linux instance, avoiding the overhead of starting and maintaining virtual machines.
More technical details
Why
● Run everywhere● Regardless of kernel version● Regardless of host distro● Physical or virtual, cloud or not● Container and host architecture must
match...
● Run anything● If it can run on the host, it can run in the
container● If it can run on a Linux kernel, it can run
What
● High level: a lightweight VM● Own process space● Own network interface● Can run stuff as root● Can have its own /sbin/init (different from
host)
● Low level: chroot on steroids● Can also have its own /sbin/init● Container = isolated processes● Share kernel with host
VMs vs Conatiners
Why are Docker Containers Lightweight
● Who should care?● What is the problem?● What is a container?● What is Docker● Docker 101● Docker demo● Docker compose● Docker compose demo
Outline
Docker 101● docker ps ● docker images● docker images ubuntu● docker run -it ubuntu /bin/bash● docker run -it ubuntu echo “hello world”● docker run -it -e FOO=bar ubuntu /bin/bash● docker run --name ubuntu_test -it ubuntu /bin/bash● docker start ubuntu_test● docker exec -it test_ubuntu /bin/bash● docker pull centos● docker run -d php:5.6-apache● docker run -v $PWD/www:/var/www/html -d -p 80 php:5.6-apache
● Who should care?● What is the problem?● What is a container?● What is Docker● Docker 101● Docker demo● Docker compose● Docker compose demo
Outline
Docker compose
Compose is a tool for defining and running multi-container applications with Docker. With Compose, you define a multi-container application in a single file, then spin your application up in a single command which does everything that needs to be done to get it running.
Docker compose (fig)
● docker-compose -f dev.yml up -d
Enterprise solutions & more
docker swarm
Google Kubernetes http://kubernetes.io/
DCHQ https://www.dchq.io
Tutum https://www.tutum.co/
Microsoft Azure - Docker
Amazon AWS
Q & AThank you