docker at crowdtwist

Post on 06-Dec-2014

133 Views

Category:

Software

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

A brief introduction to Docker and the opportunities it enables at CrowdTwist, a Loyalty Startup.

TRANSCRIPT

Docker @ CrowdTwist

What is Docker?

An open platform for distributed applications for developers and

sysadmins.— docker.com

The GitHub of dev images

So it's like a vm?

Not quite

Docker runs an OS like a first-class application

Virtual machines include an entire guest OS

Docker runs in userspace on the host

Example

$ docker run -it ubuntu /bin/bash

1. Look for an installed image tagged ubuntu2. Download it from the registry (unless it exists)

3. Create a container from the ubuntu image4. Attach bash terminal to the container

Containers

You can think of a container as aninstance of an image

Containers are super flexibleYou can run multiple from the same image at once

Can I make my own custom image?

Yes!(Just create a Dockerfile)

A Dockerfile contains commands that build

images in asemi-deterministic way

FROM ubuntu:14.04RUN apt-get update && apt-get install -y build-essential

$ docker build -t my-image .

Some of the crazy things you can do

with Docker

Running a Redis service in its own containerFROM ubuntu:12.10RUN apt-get update && apt-get install -y redis-serverEXPOSE 6379ENTRYPOINT ["/usr/bin/redis-server"]

Then linking it to a web app in another container$ docker run --link redis:db -it ubuntu /bin/bash$ > redis-cli -h $DB_PORT

How about Persistence?

Not persistent$ mountnone on / type aufs

Persistent$ mount/dev/sda1 on /opt/crowdtwist type ext4

Setting up persistent volumesFROM ubuntu:14.04RUN mkdir -p /opt/crowdtwistVOLUME ["/opt/crowdtwist"]

So what does this mean for CrowdTwist?

1. No more Parallels

2. Fast & consistent dev environment setup

Everyone pulls the latest image from Docker Hub

3. More control over tech stack

Apache, Memcached, NodeJS and Ruby are all compiled from scratch

In fact, the CrowdTwist Server images are built from a base

Ubuntu 14.04 image.

4. Local for everyone(Even Eric the Designer)

5. Everything in the cloud

Devs, Staging, QA, Outsource

(Production?)

Welcome to the beginning of

something great

Thanks :)@pheuter

@CrowdTwist

https://github.com/crowdtwist

We'reHiring!

top related