Micro Services for Lazy Developers
Eugene Krevenets
github: http://hyzhak.github.io
Docker
Intro / Laziness
Intro / Other tools
Intro / All in one
Intro / My experience
● node + mongodb
● node + postgres
● python + postgres
● and more
● ...
Intro / My other experience
sometimes they
come back
How does it works / Lightweight
Containers operate at the process level - runC (libcontainer)
How does it works / Isolated
➔ Single Responsibility. One
service - On Container
➔ Share resource between
containers (Volume, Network)
How does it works / Command line
How does it works / Kitematic
How does it works / For None-Linux
Users
➔ Docker-machine
(VirtualBox)
➔ Docker-compose
➔ Docker
Let’s play / Inheritance
Let’s play / Solo for Nodejs
FROM node:5.2
RUN mkdir /app
WORKDIR /app
COPY package.json /app/
RUN npm install
Let’s play / Solo for Python
FROM python:3.5.0
RUN apt-get update && 
apt-get install -y libmemcached-dev
RUN mkdir /app
COPY requirements.txt /app/
WORKDIR /app
RUN pip3 install -r requirements.txt
Let’s play / Docker Hub
Let’s play / Ready made Images
Let’s play / Django Duet
db:
image: postgres
web:
build: .
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- "8000:8000"
links:
- db
Let’s play / Start it
$ docker-compose up
Let’s play / Start it. Log
Pit trap
➔ Learning curve
➔ Build time (Layering)
➔ File refresh (use nodemon --legacy-watch key)
➔ Performance
➔ Dockerfile should be at the top
➔ Sometimes Linux VM can breaks itself (VirtualBox)
Thanks! Questions?
My Contacts
Eugene Krevenets
github: http://hyzhak.github.io
twitter: hyzhak / hyzhak_en

Docker. Micro services for lazy developers

  • 1.
    Micro Services forLazy Developers Eugene Krevenets github: http://hyzhak.github.io Docker
  • 2.
  • 3.
  • 4.
  • 5.
    Intro / Myexperience ● node + mongodb ● node + postgres ● python + postgres ● and more ● ...
  • 6.
    Intro / Myother experience sometimes they come back
  • 7.
    How does itworks / Lightweight Containers operate at the process level - runC (libcontainer)
  • 8.
    How does itworks / Isolated ➔ Single Responsibility. One service - On Container ➔ Share resource between containers (Volume, Network)
  • 9.
    How does itworks / Command line
  • 10.
    How does itworks / Kitematic
  • 11.
    How does itworks / For None-Linux Users ➔ Docker-machine (VirtualBox) ➔ Docker-compose ➔ Docker
  • 12.
    Let’s play /Inheritance
  • 13.
    Let’s play /Solo for Nodejs FROM node:5.2 RUN mkdir /app WORKDIR /app COPY package.json /app/ RUN npm install
  • 14.
    Let’s play /Solo for Python FROM python:3.5.0 RUN apt-get update && apt-get install -y libmemcached-dev RUN mkdir /app COPY requirements.txt /app/ WORKDIR /app RUN pip3 install -r requirements.txt
  • 15.
    Let’s play /Docker Hub
  • 16.
    Let’s play /Ready made Images
  • 17.
    Let’s play /Django Duet db: image: postgres web: build: . command: python manage.py runserver 0.0.0.0:8000 volumes: - .:/code ports: - "8000:8000" links: - db
  • 18.
    Let’s play /Start it $ docker-compose up
  • 19.
    Let’s play /Start it. Log
  • 20.
    Pit trap ➔ Learningcurve ➔ Build time (Layering) ➔ File refresh (use nodemon --legacy-watch key) ➔ Performance ➔ Dockerfile should be at the top ➔ Sometimes Linux VM can breaks itself (VirtualBox)
  • 21.
    Thanks! Questions? My Contacts EugeneKrevenets github: http://hyzhak.github.io twitter: hyzhak / hyzhak_en