Who is Docker and how he can help us? Heino Talvik heino.talvik@seb.ee heino.talvik@gmail.com
What is Docker? Software guy view: Marriage of infrastucture and Source Code Management Hardware guy view: Processes with IP addresses Sysadmin guy view: Docker is chroot on steroids IT visioner view: Revolutional change, like tar replacement with apt-get
Cargo Transport Pre-1960
Solution: Intermodal Shipping Container
The Matrix From Hell Web server??? AppServer??? Client???
The Matrix of deployment Web server AppServer Client
DOCKER HISTORY A dotcloud (PAAS provider) project Initial commit January 18, 2013 Docker 0.1.0 released March 25, 2013 27,800+ github stars, 7600+ forks, 1255 Contributors. and continues
DOCKER HISTORY A dotcloud (PAAS provider) project Initial commit January 18, 2013 Docker 0.1.0 released March 25, 2013 30,600+ 8,700+ 1,358 27,800+ github stars, 7600+ forks, 1255 Contributors. and continues
Docker Containers are like light-weight VMs.
Traditional VM approach RAM hdd cpu RAM hdd cpu RAM hdd cpu
Container approach Unassigned Container 1 Container 2 Container 3 RAM hdd cpu Host and VM OS files and libraries Host
VirtualMachine vs Docker Size Speed Integration
Docker is not a virtualization technology, it s an application delivery technology.
Terminology Docker Images are ready-only templates that help launch Docker containers. Docker Containers are responsible for the actual running of applications and includes the operating system, user added files, and meta-data. Docker Client is the user interface that allows communication between the user and the Docker daemon. Docker Daemon sits on the host machine answering requests for services. Docker Hub is a centralized registry allowing backup of Docker container images with public and private access permissions. DockerFile is a file housing instructions that help automate image creation.
Docker is NOT Enterprise Virtualization Platform Cloud Platform Configuration Management Deployment Framework Workload Management Tool Development Environment
Docker Containers Are Not Virtual Machines Are Lightweight Have Limited Isolation (RAM, HDD,CPU, etc) Are Stateless Applications Have Externalized State Have Revision Control
Images are layers my_apps CMD = /bin/bash set env var yum install FROM centos-base/7.1.1503 rootfs bootfs
Images are layers my_apps2 my_apps CMD = /bin/bash set env var yum install FROM centos-base/7.1.1503 rootfs bootfs CMD = /bin/bash set env var2 yum install2 FROM my_apps rootfs bootfs
FROM systemd_centos:1 MAINTAINER heino.talvik@seb.ee RUN mkdir /install RUN mkdir /install/openedge # from Dockerfile directory COPY PROGRESS_OE_11.6_LNX_64.tar.gz /install COPY response.ini /install/openedge RUN tar -xzvf /install/progress_oe_11.6_lnx_64.tar.gz -C /install/openedge RUN /install/openedge/proinst -b /install/openedge/response.ini -l /install/install_oe.log -n RUN rm -rf /install ENV TERM xterm Dockerfile RUN useradd -d "/home/admin" -u 1000 -m -s /bin/bash admin RUN echo '/usr/local/bin:/usr/sbin:/usr/bin:/usr/dlc/bin' > /etc/environment ENV DLC=/usr/dlc COPY openedge.sh /etc/profile.d/
Docker Ecosystem Container A Container B Port NNN Container C Docker Deamon Docker images Host Machine -any Linux
Docker Ecosystem Docker Hub Docker Client Host Machine Docker Deamon Pull Push Container A Crea te Container B List Dele te Source Code Repo
Demo With couple of docker commands from site: http://blog.riverside-software.fr/2015/12/nice-openedge-db-charts-with-docker.html
Demo
Commands: 1/2 attach build commit cp create diff events exec export history images import info inspect kill load login logout Attach to a running container Build an image from a Dockerfile Create a new image from a container's changes Copy files/folders from a container to a HOSTDIR or to STDOUT Create a new container Inspect changes on a container's filesystem Get real time events from the server Run a command in a running container Export a container's filesystem as a tar archive Show the history of an image List images Import the contents from a tarball to create a filesystem image Display system-wide information Return low-level information on a container or image Kill a running container Load an image from a tar archive or STDIN Register or log in to a Docker registry Log out from a Docker registry
logs pause port ps pull push rename restart rm rmi run save search start stats stop tag top unpause version wait Commands: 2/2 Fetch the logs of a container Pause all processes within a container List port mappings or a specific mapping for the CONTAINER List containers Pull an image or a repository from a registry Push an image or a repository to a registry Rename a container Restart a running container Remove one or more containers Remove one or more images Run a command in a new container Save an image(s) to a tar archive Search the Docker Hub for images Start one or more stopped containers Display a live stream of container(s) resource usages Stop a running container Tag an image into a repository Display the running processes of a container Unpause all processes within a container Show the Docker version information Block until a container stops, then print s exit code
What s in it for Developers? Build once run anywhere Clean, safe, hygienic and portable runtime for your app No worries about missing dependencies and packages during deployment Safely isolate applications in their own containers without worrying about conflicting versions, dependencies and packages Automate everything integration, packaging and deployment Eliminate concerns about OS, platform and runtimes Deploy in a VM without the overhead of VM Instant replay and reset of image snapshots 29
What s in it for DevOps? Configure once run everywhere Make the lifecycle more efficient, consistent and repeatable Increased the quality of code produced by developers Efficiently manage development, test, staging and production environments Separate roles & responsibilities Significantly improve the reliability of continuous integration and continuous delivery Simpler than managing VMs in terms of cost, performance, deployment and portability 30
Solutions Docker solutions and Tools Docker Hub Docker Trusted Registery Docker Tutum Universal Control Plane Tools Docker Engine Docker Kitematic Docker Registry Docker Machine Docker Swarm Docker Compose
Docker Hub In Cloud Public and Private Repositories
Docker Trusted Registry allows you to store and manage your Docker images on-premise or in your virtual private cloud
Tutum Docker hosting for your containers
Docker Universal Control Plane Currently in beta / NOT ANYMORE Can be deployed to any private infrastructure and public clouds
Docker Datacenter
Docker Compose allows you to define your multi-container application with all of its dependencies in a single file, then spin your application up in a single command.
Docker Toolbox Docker for Mac and for Windows. Installs Docker Client Docker Machine Compose Kitematic VirtualBox.
Kitematic fastest and easiest way to start using Docker on your laptop.
Docker Registry Flexible Storage Backends Integrate to Your Workflow Flexible Authentication Horizontal Scalability High Performance Content Delivery
automatically sets up Docker on your computer, on cloud providers, and inside your data center. provisions the hosts, installs Docker Engine on them, and then configures the Docker client to talk to the Docker Engines. Docker Machine
Docker Swarm provides native clustering capabilities to turn a group of Docker engines into a single, virtual Docker Engine.
Docker use cases
Docker and legacy
Questions?