docker 101 checonf 2016

42
Docker 101 and Why Docker Powers Eclipse Che Patrick Chanezon, Docker

Upload: patrick-chanezon

Post on 06-Jan-2017

4.037 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Docker 101 Checonf 2016

Docker 101 and Why Docker Powers Eclipse Che

Patrick Chanezon, Docker

Page 2: Docker 101 Checonf 2016

French

Polyglot

Platforms

Software Plumber

San Francisco

Developer Relations

@chanezon

Page 3: Docker 101 Checonf 2016

PublicHybridPrivate

Ops Devops Developers

Page 4: Docker 101 Checonf 2016

Linux Container Ecosystem

flockerglusterfs

weavecalicomidokuracisconuage

Cloud

OS

Plugins

Orchestration

Page 5: Docker 101 Checonf 2016

The world needstools of mass innovation

Page 6: Docker 101 Checonf 2016

A programmable Internet would be the ultimate tool of mass innovation

Page 7: Docker 101 Checonf 2016

A commercial product,

built ona development platform,

built oninfrastructure,

built onstandards.

Docker is building a stack to program the Internet

Page 8: Docker 101 Checonf 2016

Isolation using Linux kernel featuresnamespaces pid mnt net uts ipc user

cgroups memory cpu blkio devices

Page 9: Docker 101 Checonf 2016

Image layers

Page 10: Docker 101 Checonf 2016

Dockerfile

FROM java:8MAINTAINER Patrick Chanezon <[email protected]>EXPOSE 8080COPY spring-doge/target/*.jar /usr/src/spring-doge/spring-doge.jarWORKDIR /usr/src/spring-dogeCMD java -Dserver.port=8080 -Dspring.data.mongodb.uri=$MONGODB_URI -jar spring-doge.jarHEALTHCHECK --interval=5m --timeout=3s --retries=3 \ CMD curl -f http://localhost:8080/ || exit 1

Page 11: Docker 101 Checonf 2016

Using Docker to compile your jar/war

https://registry.hub.docker.com/_/maven/

docker run -it --rm \-v $PWD:/usr/src/spring-doge \-v maven:/root/.m2 \-w /usr/src/spring-doge \maven:3.3-jdk-8 \mvn package

Page 12: Docker 101 Checonf 2016

Build an imagedocker build -t chanezon/spring-doge .FROM java:8MAINTAINER Patrick Chanezon <[email protected]>EXPOSE 8080COPY spring-doge/target/*.jar /usr/src/spring-doge/spring-doge.jarWORKDIR /usr/src/spring-dogeCMD java -Dserver.port=8080 -Dspring.data.mongodb.uri=$MONGODB_URI -jar spring-doge.jarHEALTHCHECK --interval=5m --timeout=3s --retries=3 \ CMD curl -f http://localhost:8080/ || exit 1

Page 13: Docker 101 Checonf 2016

Analyzing imagesdocker images javadocker history java:8

Page 14: Docker 101 Checonf 2016

Run a containerdocker run \—env MONGODB_URI=mongodb://mongo:27017/test \-p 8090:8080 \chanezon/spring-doge

Page 15: Docker 101 Checonf 2016

docker-compose: running multiple containers Run your stack with one command: docker-compose

up Describe your stack with one file: docker-compose.ymlversion: '2'services: web: image: chanezon/spring-doge ports: - "8080:8080" links: ["mongo"] environment: - MONGODB_URI=mongodb://mongo:27017/test mongo: image: mongo

Page 16: Docker 101 Checonf 2016

Using the service APIdocker network create -d overlay dogenet

docker service create --name mongo \--network dogenet \mongo

docker service create --name doge \--network dogenet \--publish 8070:8080 \--replicas 3 \--env MONGODB_URI=mongodb://mongo:27017/test \chanezon/spring-doge

Page 17: Docker 101 Checonf 2016

Demo

Page 18: Docker 101 Checonf 2016

• Spring Boot, Spring Data• AngularJS front-end• docker 1.12• compose 1.8.1

Spring Boot App using MongoDB

https://github.com/joshlong/spring-doge

https://github.com/chanezon/docker-tips/https://github.com/chanezon/spring-doge

Page 19: Docker 101 Checonf 2016

Docker Java Labs

https://github.com/docker/labs/tree/master/developer-tools/

• Wildfly and Couchbase J2EE App• Debugging a Java app in Docker using Eclipse

Page 20: Docker 101 Checonf 2016

What’s New?

Page 21: Docker 101 Checonf 2016

1.

Developer experience

Page 22: Docker 101 Checonf 2016

1. Get out of the way

The best tools…

2. Adapt to you

3. Make thepowerful simple

Page 23: Docker 101 Checonf 2016

Docker for Mac Docker for Windows

Page 24: Docker 101 Checonf 2016

2.

Orchestration

Page 25: Docker 101 Checonf 2016

Introducing the best way to orchestrate Docker: Docker.

Docker 1.12: now with orchestration built-in.

Page 26: Docker 101 Checonf 2016

Swarm mode

Service API

Cryptographic node identity

Built-in routing mesh

Docker 1.12: now with orchestration built-in.

Page 27: Docker 101 Checonf 2016

Using the beta? You already have 1.12 installed.

> docker swarm init> docker service create

Page 28: Docker 101 Checonf 2016

3.

Ops experience

Page 29: Docker 101 Checonf 2016

Deep integration with native load-balancers, templates,SSH keys, ACLs, scaling groups, firewall rules…

beta.docker.com

Page 30: Docker 101 Checonf 2016

Distributed Application Bundle

experimenta

l www.docker.com/dab

A portable format for multi-container applications

Page 31: Docker 101 Checonf 2016
Page 32: Docker 101 Checonf 2016

Docker Store Beta

Page 33: Docker 101 Checonf 2016

Docker CaaS

Page 34: Docker 101 Checonf 2016

Goals

+ +

Agility Portability Control

Page 35: Docker 101 Checonf 2016

BUILDDevelopment Environments

SHIPRegistry: Secure Content &

Collaboration

RUNControl Plane: Deploy,

Orchestrate, Manage, Scale

Networking Volumes MonitoringLoggingConfig MgtCI/CD

IT OperationsDevelopers IT Operations

Docker CaaS Workflow

Page 36: Docker 101 Checonf 2016

Docker Universal Control Plane

Integrated Security

Docker EngineContainer runtime, orchestration, networking, volumes, plugins

Docker Trusted Registry

Operating Systems Config Mgt Monitoring LoggingCI/CD ..more..Images Networking Volumes

VirtualizationPublic Cloud Physical

Docker Datacenter

Docker Datacenter platform

Page 37: Docker 101 Checonf 2016

Docker Universal Control Plane

Page 38: Docker 101 Checonf 2016

UCP Permission Model

Page 39: Docker 101 Checonf 2016

What’s New in Docker Datacenter (Nov 2016)

Orchestration & Operations

• Built in Docker 1.12 orchestration

• Desired app state with docker service

• Backwards compatibility for ‘docker run’

• HTTP Routing Mesh (experimental)

• Expanded storage support

End to End Security

• Integrated Notary installation and HA as part of DTR

• Layered image signing and runtime policy enforcement

• Improved Access Controls

User Experience

• Refreshed GUI • Node management• GC performance

enhancements• Container health checks• Tag metadata and

activity streams• Installation flags

Page 40: Docker 101 Checonf 2016

Security scanning in Docker Cloud

Page 41: Docker 101 Checonf 2016

Thank You

Page 42: Docker 101 Checonf 2016

CheConf2016 Agenda: Up Next11:0

0CheConf Keynote 15:00 Deploying Che to OpenShift

12:00

Language Server Protocol 15:30 Pair Programming in Che

12:30

Host any Project in Che 16:00 Building an IoT IDE with Che

13:30

Docker in Che 16:30 Codenvy: Che for Enterprises

14:00

Extending Che 17:00 Become Part of the Project