Top Banner
GETTING STARTED WITH DOCKER (for developers) BY: CURT GRATZ
39

Getting Started with Docker (For Developers)

Apr 16, 2017

Download

Technology

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Getting Started with Docker (For Developers)

GETTING STARTED WITH DOCKER (for developers)BY: CURT GRATZ

Page 2: Getting Started with Docker (For Developers)
Page 3: Getting Started with Docker (For Developers)
Page 4: Getting Started with Docker (For Developers)
Page 5: Getting Started with Docker (For Developers)
Page 6: Getting Started with Docker (For Developers)
Page 7: Getting Started with Docker (For Developers)
Page 8: Getting Started with Docker (For Developers)

‣ Why you should contain

everything in containers

that contain things

‣ Everything about Docker

‣ Euclid's proof of the

infinitude of primes

What we won’t be covering

Page 9: Getting Started with Docker (For Developers)

‣ Learn about Docker from a developers perspective

‣ Learn how to get started with Docker

‣ Learn the basic Docker commands you will use every day as a developer

‣ Get Docker installed and running on your machine

What we will be covering

Page 10: Getting Started with Docker (For Developers)

‣ Husband

‣ Dad

‣ Coach

‣ Youth Leader

‣ Co-Owner of Computer Know How

‣ Member of Team ColdBox

‣ Open CFML Foundation Board

The Obligatory Who Am I?

Page 11: Getting Started with Docker (For Developers)

‣ Tried Docker

‣ Deployed Docker

‣ Installed Docker locally

‣ Written a Dockerfile

‣ An image on Docker Hub

Little about you

Page 12: Getting Started with Docker (For Developers)

Matrix of Hell

Page 13: Getting Started with Docker (For Developers)

How shipping solved the problem

Page 14: Getting Started with Docker (For Developers)

How containers solve the problem

Page 15: Getting Started with Docker (For Developers)

Docker is Open Source

Page 16: Getting Started with Docker (For Developers)

Written in Go

Page 17: Getting Started with Docker (For Developers)

Its not Ruby, so the Python people are happy

Page 18: Getting Started with Docker (For Developers)

Its not Python, so the Ruby people are happy

Page 19: Getting Started with Docker (For Developers)

Its not Node.JS, so most people are happy

Page 20: Getting Started with Docker (For Developers)

Its not Java, so everyone is happy

Page 21: Getting Started with Docker (For Developers)

Its not CFML, so no one is happy

Page 22: Getting Started with Docker (For Developers)

A contract between Dev and Ops

Page 23: Getting Started with Docker (For Developers)

Build Once Run Anywhere

Page 24: Getting Started with Docker (For Developers)

Cattle, not Pets

Page 25: Getting Started with Docker (For Developers)

Install Party

Page 26: Getting Started with Docker (For Developers)
Page 27: Getting Started with Docker (For Developers)

Image

Image, a hierarchy of files, with meta-data for how to run a container.

Page 28: Getting Started with Docker (For Developers)

Container

Container, a contained running process, started from an image.

Page 29: Getting Started with Docker (For Developers)

Registry

Registry, a repository of images. - Public or Private

Page 30: Getting Started with Docker (For Developers)

Dockerfile

Dockerfile, a script for creating images.

Page 31: Getting Started with Docker (For Developers)

Volume

Storage outside the container.

Page 32: Getting Started with Docker (For Developers)
Page 33: Getting Started with Docker (For Developers)

Commands for images

‣ $ docker images # shows all images.

‣ $ docker import # creates an image from a tarball.

‣ $ docker build # creates image from Dockerfile.

‣ $ docker commit # creates image from a container.

‣ $ docker rmi # removes an image.

‣ $ docker history # list changes of an image.

Page 34: Getting Started with Docker (For Developers)

Commands for Dockerfile‣ FROM - The image the new image will be based on.

‣ COPY - Copy a file or dir into the image

‣ ADD - Like copy, but can be a URL or unpack a tar

‣ RUN - Ran a command inside the container

‣ ONBUILD - Run commands when building

‣ CMD - Default command to run

‣ ENV - Set a environment variable

‣ EXPOSE - expose a port

‣ VOLUME - Specify that a directory should be stored outside the union file system

Page 35: Getting Started with Docker (For Developers)

Commands for containers‣ $ docker create # creates a container but does not start it.

‣ $ docker run # creates and starts a container.

‣ $ docker stop # stops it.

‣ $ docker start # will start it again.

‣ $ docker restart # restarts a container.

‣ $ docker rm # deletes a container.

‣ $ docker kill # sends a SIGKILL to a container.

‣ $ docker exec # executes a command in a running container.

Page 36: Getting Started with Docker (For Developers)

Commands for inspecting‣ $ docker ps # shows running containers.

‣ $ docker inspect # info on a container (incl. IP address).

‣ $ docker logs # gets logs from container.

‣ $ docker events # gets events from container.

‣ $ docker port # shows public facing port of container.

‣ $ docker top # shows running processes in container.

‣ $ docker diff # shows changed files in container's FS.

‣ $ docker stats # shows metrics, memory, cpu, filsystem

Page 37: Getting Started with Docker (For Developers)

Demo time

Page 38: Getting Started with Docker (For Developers)

“Thank you.”

–hold up applause sign here

Page 39: Getting Started with Docker (For Developers)

‣ Email - [email protected]

‣ Blog - http://www.compknowhow.com/blog/

‣ Twitter - gratzc

‣ Skype - gratzc

‣ Snapchat - gratzc

‣ League of Legends - gratzc

Contact Info