In this presentation Nathan LeClaire outlines some of the ways Docker can help polyglots (those who speak multiple languages) to be more efficient and happier in their workflows.
2. WELCOME
• I appreciate your participation ! To speak at this
conference is an honor.
• Today we are going to talk about "Docker For
Polyglots".
• A "polyglot" is someone who speaks multiple
languages.
9. FACT:
VARIETY
• Developers want to use a variety of programming
languages
• "The right tool for the right job"
• This complicates the process of setting up
development environments and running operations
10. FACT:
TECHNOLOGY CHANGES RAPIDLY
• Front end web development alone has a huge
explosion of options including SASS, Grunt,
Yeoman, etc.
• Not every developer on your team is going to be
an expert in tooling for every language but they
still might want to contribute
• More friction == less productivity
11. FACT:
TOOLING IS DIFFICULT
• For instance, Maven might be intimidating to a Go
developer.
• Python programmers might want to use Ruby
sometimes but don't know how to use rbenv or
rvm
• Contributing to open source is very difficult for this
reason.
12. FACT:
"BUS FACTOR" RISK IS HIGH
• If "the person who sets up the environments" on
your team was hit by a bus tomorrow, would it be
easy or hard to keep going?
• Can any person on your team destroy their
development environment and re-build it from
scratch automatically?
14. DOCKER CAN HELP
• Docker provides a way of distributing applications
• It also provides orchestration tools for developing
them
• End game is to reduce friction to the point where
transitioning between projects is seamless
23. WHAT IS A POLYGLOT?
"DEVELOPER LANGUAGE"
"We need to add some migrations
to run for the database, a few
controllers, and also some jobs to
run in the background queue."
24. WHAT IS A POLYGLOT?
"OPERATOR LANGUAGE"
"Let's set up some automation
around our load balancers, store
these files in an S3 bucket and
consider moving to a cross-cloud
solution with overlay networking."
27. I DON'T KNOW ANYTHING
ABOUT LUA...
...AND ONLY A LITTLE
ABOUT NGINX.
28. SETTING UP OPENRESTY
MANUALLY
$ sudo apt-get install -y make build-essential libreadline-dev libncurses5-dev
libpcre3-dev libssl-dev perl make build-essential
$ # Go to browser, click around on "Download Page"
$ wget https://openresty.org/download/ngx_openresty-1.9.3.1.tar.gz
$ tar xvf ngx_openresty-1.9.3.1.tar.gz
$ cd ngx_openresty-1.9.3.1
$ ./configure; make; make install
35. WE CAN MAKE DOCKERFILE.
IT WILL RUN ON ANY OS WITH
COMPATIBLE KERNEL.
from debian:jessie
run apt-get update
run apt-get install -y
libreadline-dev
libncurses5-dev
libpcre3-dev
libssl-dev
perl
wget
make
build-essential
run mkdir -p /openresty
workdir /openresty
env OPENRESTY_VERSION 1.7.10.2
run wget http://openresty.org/download/ngx_openresty-${OPENRESTY_VERSION}.tar.gz
run tar xzvf ngx_openresty-${OPENRESTY_VERSION}.tar.gz
run cd ngx_openresty-${OPENRESTY_VERSION}/ &&
./configure &&
make &&
make install
env PATH /usr/local/openresty/nginx/sbin:$PATH
add https://get.docker.com/builds/Linux/x86_64/docker-latest /docker
run chmod +x /docker
add . /app
workdir /app
entrypoint ["./entrypoint.sh"]
36. BUILD, SHIP, & RUN
$ docker build -t nathanleclaire/openresty .
$ docker push nathanleclaire/openresty
$ # Now we can pull from anywhere!
$ # On another computer...
$ docker run -d -P nathanleclaire/openresty
37. YOU CAN USE AUTOMATED BUILDS ON
DOCKER HUBTO LEARN FROM OTHER
PEOPLE