27
Docker - Fundamental Blackie 2015.10.15

Docker - fundamental

Embed Size (px)

Citation preview

Page 1: Docker  - fundamental

Docker - Fundamental

Blackie

2015.10.15

Page 2: Docker  - fundamental

What is docker

what can docker do

Docker hands on

problems

Page 3: Docker  - fundamental

WHAT IS DOCKER

Page 4: Docker  - fundamental

Build, Ship, Run

An open platform for distributed applications for developers and sysadmins

Docker uses resource isolation features of the Linux kernel.

Docker allows you to package an application with all of its dependencies into a standardized unit for software development

Lightweight

Open

Security

Page 5: Docker  - fundamental

How to work with Linux Kernal

Page 6: Docker  - fundamental

Different from VM

Containers have similar resource isolation and allocation benefits as virtual machines but a different architectural approach allows them to be much more portable and efficient.

Page 7: Docker  - fundamental

Dockerfile

Docker can build images automatically by reading the instructions from a Dockerfile.

A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image.

Using docker build users can create an automated build that executes several command-line instructions in succession.

Sample of Redis

https://docs.docker.com/examples/running_redis_service/

Page 8: Docker  - fundamental

Docker Hub

The Docker Hub is a cloud-based registry service for building and shipping application or service containers.

https://hub.docker.com/

Page 9: Docker  - fundamental

Docker and GitHub

Page 10: Docker  - fundamental

Docker with AWS

Docker Containers on AWS

Page 11: Docker  - fundamental

Docker with Azure

Quick Start: Windows Server Containers and Docker

Page 12: Docker  - fundamental

WHAT CAN DOCKER DO

Page 13: Docker  - fundamental

Docker User Cases

Page 14: Docker  - fundamental

Benefits from Docker

Accelerate Developer Onboarding

Empower Developer Creativity

Eliminate Environment Inconsistencies

Easily Share and Collaborate on Applications

Ship More Software Faster

Quickly Scale

Easily Remediate Issues

Page 15: Docker  - fundamental

Scenario : New Comer on Board(Now)

Install VS

Prepare development environment

Install DB(MSSQL, Oracle)

Install IIS feature

Install Redis, MongoDB

Install Jenkins

Install Task runner(Grunt/Gulp)

Install other(NodeJS, Nginx, Elastic Search, etc…)

Start domain training

Page 16: Docker  - fundamental

It is Annoying…

Page 17: Docker  - fundamental

Scaenario : New Comer on Board(Docker)

Install VS

Docker Install & Run

Start domain training

Faster and more Simple

Page 18: Docker  - fundamental

Scenario : Continuous Integration (Now)

Commit code to DEV SVN

Build DEV SVN

Test in DEV SVN

But Broken another function or some urgent issue interrupted development

Page 19: Docker  - fundamental

WTF…

Page 20: Docker  - fundamental

Scenario : Continuous Integration (Docker)

Develop in Local

Build in Local

Test in Local

Consistent thetools and environments

Page 21: Docker  - fundamental

DOCKER HANDS ON

Page 22: Docker  - fundamental

Docker Training

https://training.docker.com/

Page 23: Docker  - fundamental

Docker on Windows

Windows Server 2016 and System Center 2016 support

Windows Server Container

Boot2Docker(for Windows & Mac)

Lightweight Linux distribution based on Tiny Core Linux made specifically to run Dockercontainers.

RAM, weighs ~27MB

Boots in ~5s

Page 24: Docker  - fundamental

Docker Toolbox

Required

Enable Virtualization Technology on Bios

Install Git(Docker Toolbox including it)

Download Docker Toolbox

Docker terminal

Kitematic(GUI tool)

First launch Docker terminal or Kitematic have problem please remove default VM and create a new one

1. docker-machine rm default

2. docker-machine --native-ssh create -d virtualbox

Page 25: Docker  - fundamental

Play with Docker Toolbox - Docker terminal

1. Create a Docker container from Dockerfile

2. Build Instance

docker build -t <your username>/redis .

3. Run the service

docker run --name redis -d <your username>/redis

Docker terminal

Page 26: Docker  - fundamental

Play with Docker Toolbox - Kitematic

1. Open Kitematic(Docker GUI tool)

2. Download service for Docker Hub

3. Run the service

4. Enjoy it

Kitematic

Page 27: Docker  - fundamental

Reference

10個Q&A快速認識Docker

《Docker ——從入門到實踐》正體中文版

CI/CD Reference Architecture with Docker

漫谈Docker--云时代的程序分发方式