Fixing the "It works on my machine!" Problem with Docker

Similar documents
Think Small to Scale Big

USING DOCKER FOR MXCUBE DEVELOPMENT AT MAX IV

Who is Docker and how he can help us? Heino Talvik

[Docker] Containerization

/ Cloud Computing. Recitation 5 February 14th, 2017

Running MarkLogic in Containers (Both Docker and Kubernetes)

SQL Server inside a docker container. Christophe LAPORTE SQL Server MVP/MCM SQL Saturday 735 Helsinki 2018

Advanced Continuous Delivery Strategies for Containerized Applications Using DC/OS

DevOps Course Content

/ Cloud Computing. Recitation 5 September 26 th, 2017

Industry-leading Application PaaS Platform

Using DC/OS for Continuous Delivery

Docker II - Judgement Day

AGILE DEVELOPMENT AND PAAS USING THE MESOSPHERE DCOS

Getting Started With Containers

Docker 101 Workshop. Eric Smalling - Solution Architect, Docker

Docker and Security. September 28, 2017 VASCAN Michael Irwin

Docker and Oracle Everything You Wanted To Know

CONTINUOUS DELIVERY WITH DC/OS AND JENKINS

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

Package your Java Application using Docker and Kubernetes. Arun

Nevin Dong 董乃文 Principle Technical Evangelist Microsoft Cooperation

Kuber-what?! Learn about Kubernetes

Deploying Applications on DC/OS

Containers, Serverless and Functions in a nutshell. Eugene Fedorenko

VMware s (Open Source) Way of Container. Dr. Udo Seidel

Docker Live Hacking: From Raspberry Pi to Kubernetes

~Deep dive into Windows Containers and Docker~

/ Cloud Computing. Recitation 5 September 27 th, 2016

Sunil Shah SECURE, FLEXIBLE CONTINUOUS DELIVERY PIPELINES WITH GITLAB AND DC/OS Mesosphere, Inc. All Rights Reserved.

70-532: Developing Microsoft Azure Solutions

Cloud I - Introduction

agenda PAE Docker Docker PAE

Security oriented OpenShift within regulated environments

Deployment Patterns using Docker and Chef

CONTINUOUS DELIVERY WITH MESOS, DC/OS AND JENKINS

Go Faster: Containers, Platforms and the Path to Better Software Development (Including Live Demo)

70-532: Developing Microsoft Azure Solutions

GoDocker. A batch scheduling system with Docker containers

Important DevOps Technologies (3+2+3days) for Deployment

ASP.NET Core & Docker

Azure DevOps. Randy Pagels Intelligent Cloud Technical Specialist Great Lakes Region

STATE OF MODERN APPLICATIONS IN THE CLOUD

What I ll be talking about. About me & bol.com The CI/CD bol.com Current setup. The future in the cloud

Pursuit of stability. Growing AWS ECS in production. Alexander Köhler Frankfurt, September 2018

Knative: Building serverless platforms on top of Kubernetes

Developing and Testing Java Microservices on Docker. Todd Fasullo Dir. Engineering

WHITE PAPER. RedHat OpenShift Container Platform. Benefits: Abstract. 1.1 Introduction

How to Keep UP Through Digital Transformation with Next-Generation App Development

A DEVOPS STATE OF MIND. Chris Van Tuin Chief Technologist, West

Microservices. Chaos Kontrolle mit Kubernetes. Robert Kubis - Developer Advocate,

利用 Mesos 打造高延展性 Container 環境. Frank, Microsoft MTC

The age of orchestration

In-cluster Open Source Testing Framework

Welcome to Docker Birthday # Docker Birthday events (list available at Docker.Party) RSVPs 600 mentors Big thanks to our global partners:

Arup Nanda VP, Data Services Priceline.com

Midterm Presentation Schedule

Real world Docker applications

IBM Cloud Developer Tools (IDT) and App Service Console Overview

Docker at Lyft Speeding up development Matthew #dockercon

Docker und IBM Digital Experience in Docker Container

Investigating Containers for Future Services and User Application Support

UP! TO DOCKER PAAS. Ming

CONTAINERS AND MICROSERVICES WITH CONTRAIL

Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2

DevOps in the Cloud A pipeline to heaven?! Robert Cowham BCS CMSG Vice Chair

Buenos Aires 31 de Octubre de 2018

DOCKER 101 FOR JS AFFICIONADOS. Christian Ulbrich, Zalari UG

Securing Microservice Interactions in Openstack and Kubernetes

Container-based virtualization: Docker

Continuous Integration and Delivery with Spinnaker

DEPLOYMENT MADE EASY!

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

Beyond 1001 Dedicated Data Service Instances

Running Splunk Enterprise within Docker

An introduction to Docker

Cloud & container monitoring , Lars Michelsen Check_MK Conference #4

GETTING STARTED WITH WINDOWS CONTAINERS, DOCKER AND AZURE

Kubernetes Integration Guide

The Post-Cloud. Where Google, DevOps, and Docker Converge

Networking Approaches in. a Container World. Flavio Castelli Engineering Manager

Prometheus For Big & Little People Simon Lyall

Containers & Microservices For Realists. Karthik

AGILE RELIABILITY WITH RED HAT IN THE CLOUDS YOUR SOFTWARE LIFECYCLE SPEEDUP RECIPE. Lutz Lange - Senior Solution Architect Red Hat

Continuous Delivery the hard way with Kubernetes. Luke Marsden, Developer

Docker A FRAMEWORK FOR DATA INTENSIVE COMPUTING

Best Practices for Developing & Deploying Java Applications with Docker

Internet2 Technology Exchange 2018 October, 2018 Kris Steinhoff

There's More to Docker than the Container The Docker Platform

FROM VSTS TO AZURE DEVOPS

Lessons Learned: Deploying Microservices Software Product in Customer Environments Mark Galpin, Solution Architect, JFrog, Inc.

A Comparision of Service Mesh Options

OpenShift 3 Technical Architecture. Clayton Coleman, Dan McPherson Lead Engineers

DevOps Workflow. From 0 to kube in 60 min. Christian Kniep, v Technical Account Manager, Docker Inc.

AWS Integration Guide

Unify DevOps and SecOps: Security Without Friction

Run containerized applications from pre-existing images stored in a centralized registry

Przyspiesz tworzenie aplikacji przy pomocy Openshift Container Platform. Jarosław Stakuń Senior Solution Architect/Red Hat CEE

A DEVOPS STATE OF MIND WITH DOCKER AND KUBERNETES. Chris Van Tuin Chief Technologist, West

A DEVOPS STATE OF MIND. Chris Van Tuin Chief Technologist, West

Transcription:

Fixing the "It works on my machine!" Problem with Docker Jared M. Smith @jaredthecoder

About Me Cyber Security Research Scientist at Oak Ridge National Lab BS and MS in Computer Science from the University of Tennessee-Knoxville, current PhD student Guest Teacher at Treehouse Intro to Big Data Intro to Docker Basic Web Security OWASP Top 10

A Tale of Two Developers

Monday

Wednesday

Friday

Following Monday

This does not have to be you or your team...

Docker

Docker's Mission

Released in 2013, now Docker is in use almost everywhere.

Docker makes packaging software simple.

Docker makes deploying software simple.

Docker makes scaling software simple.

Docker makes securing software simple.

Docker simplifies the following: Packaging software Deploying software Running complex dependencies like DBs or isolating entire OSes for testing Connecting and scaling microservices Building CI/CD pipelines

Background

Containers not VMs

What's a Container? Standardized packaging for software and dependencies Isolate apps from eachother Shares the same OS kernel Works for all major Linux distributions and in Windows Server 2016+

Terminology Docker Image Docker Container Docker Engine Registry Service Docker Hub Docker Trusted Registry

Diving In

Basic Docker Commands $ docker pull nashcash/paymentgateway:latest $ docker images $ docker run d p 5000:5000 -name payments nashcash/payment-gateway:latest $ docker ps $ docker exec -it <container id> /bin/bash

Basic Docker Commands $ docker stop payments (or <container id>) $ docker restart/start payments (or <container id>) $ docker rm payments (or <container id>) $ docker rmi nashcash/paymentgateway:latest (or <image id>)

Basic Docker Commands $ docker build t nashcash/payment-gateway: 2.0. $ docker image push nashcash/paymentgateway:2.0 $ docker search node

Dockerfile FROM node:latest USER node RUN mkdir -p /usr/src/app WORKDIR /usr/src/app COPY package.json /usr/src/app/ RUN npm install COPY. /usr/src/app EXPOSE 3000 CMD [ npm, start ] The Dockerfile declares how to deploy your app or service

Each Dockerfile command creates a layer of the image.

New and old images share layers.

Docker copies data on write enabling fast startup and minimal disk usage.

By wrapping up app install and setup into a Dockerfile, and then using the Docker CLI, building and deploying can be very simple.

Installation Docker provides native apps for Mac and Windows, and via package managers for Linux docker.com/getdocker AWS, Microsoft Azure, and Google Cloud all support Docker as well

Scaling Up

Networking Connect multiple containers with bridge networking: $ docker network create -d bridge -- name bridgenet1 Map ports from container to host: $ docker container run -p 8080:80... Connect multiple hosts with their own containers with an overlay: $ docker network create -d overlay -- name overnet

To dockerize apps + external services or other apps, use Docker Compose.

Remember our Dockerfile earlier? FROM node:latest USER node RUN mkdir -p /usr/src/app WORKDIR /usr/src/app COPY package.json /usr/src/app/ RUN npm install COPY. /usr/src/app EXPOSE 3000 CMD [ npm, start ]

Let's Add MongoDB! services: app: build:. ports: - "3000:3000" links: - mongo mongo: image: mongo volumes: -./data:/data/db ports: - "27017:27017"

And Redis! services:... redis: image: redis ports: - "6379:6379"

Docker Compose $ docker-compose build $ docker-compose up $ docker-compose down

What about running multiple (even tens or thousands) Docker containers across hosts?

You need Orchestration.

The community has you covered Docker Swarm Apache Mesos Kubernetes...

Running In Production

Monitoring Docker Stats: docker stats Logs: docker service logs Prometheus Endpoint (new in Docker 1.13) Docker's Remote API: /container/ {container-name cid}/stats cadvisor: https://github.com/google/ cadvisor

Service Mesh linkerd: https://linkerd.io/ service discovery load balancing failure handling, instrumentation routing to all inter-service communication Envoy: https://www.envoyproxy.io/

CI/CD with Docker and Jenkins *Graphic based on image from Arun Gupta of Couchbase.

Dockerizing React- Slingshot by Cory House

What We're Working With Repo: https://github.com/coryhouse/ react-slingshot From the repo: "React + Redux starter kit / boilerplate with Babel, hot reloading, testing, linting and a working example app, all built in" We're also going make the app connect to a backend server that will talk to MongoDB

Let's begin!

Lessons Learned Docker is usually easy to use and can improve software dev a lot Integration, scaling, security, and testing are all well-explored areas with Docker With Docker, you can't tell your team that it works for you so it should for them If you do, now you're the kid saying the "dog ate my homework"

Thank you! Follow @jaredthecoder for lots of web security, devops, and data science Checkout my 2-hour Intro to Docker course on Treehouse (teamtreehouse.com) for more Links to slides and code to be posted on Github, Twitter, and jaredthecoder.com/talks