Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to Docker by Amjith Ramanujam

D21717ea76044d31115c573d368e6ff4?s=47 PyCon 2014
April 12, 2014
2k

Introduction to Docker by Amjith Ramanujam

D21717ea76044d31115c573d368e6ff4?s=128

PyCon 2014

April 12, 2014
Tweet

Transcript

  1. @amjithr Intro to Docker PYCON ▪ Saturday, April 12, 14

  2. @amjithr Hi  Saturday, April 12, 14

  3. Saturday, April 12, 14

  4. @amjithr Why? Saturday, April 12, 14

  5. @amjithr Why? Saturday, April 12, 14

  6. @amjithr Why? Saturday, April 12, 14

  7. @amjithr Why? Saturday, April 12, 14

  8. @amjithr Why? Saturday, April 12, 14

  9. @amjithr Why? Saturday, April 12, 14

  10. @amjithr Why? Celery Saturday, April 12, 14

  11. @amjithr Why? Celery Saturday, April 12, 14

  12. @amjithr WHAT’S Docker? Saturday, April 12, 14

  13. @amjithr WHAT’S Docker? Not Pants Saturday, April 12, 14

  14. @amjithr DotCloud -> Docker Inc Jan Written in Go Active

    community History Saturday, April 12, 14
  15. @amjithr “Docker is an open-source engine that automates the deployment

    of any application as a lightweight, portable, self-sufficient container that will run virtually anywhere*.” Saturday, April 12, 14
  16. @amjithr CHROOT BSD JAILS SOLARIS ZONES What? Saturday, April 12,

    14
  17. @amjithr Linux Containers AUFS Git like versioning REST API What?

    Saturday, April 12, 14
  18. @amjithr What? Bare Metal Host OS Hypervisor Guest OS Libs

    AppA Guest OS Libs AppB Guest OS Libs AppC Bare Metal Host OS D o c k e r Libs Libs App A App A’ App B App B’ VM Container Saturday, April 12, 14
  19. @amjithr Lightweight  Isolated Instances Faster than VMs Why? Saturday,

    April 12, 14
  20. @amjithr docs.docker.io - Installation instructions OS X - boot docker

    (VM) + docker client Setup Linux C0 C1 client Saturday, April 12, 14
  21. @amjithr docs.docker.io - Installation instructions OS X - boot docker

    (VM) + docker client Setup OS X VBox linux C0 C1 client Linux C0 C1 client Saturday, April 12, 14
  22. @amjithr Docker Daemon - Server Docker Client - Client Terminology

    Saturday, April 12, 14
  23. @amjithr Terminology Daemon Linux TCP Socket Client Client Linux TCP

    Client OS X TCP Saturday, April 12, 14
  24. @amjithr  DEMO Saturday, April 12, 14

  25. @amjithr Images - Read-only snapshot Containers - Instantiation of an

    Image Terminology Saturday, April 12, 14
  26. @amjithr Terminology Master Copy Photocopy B + Margin Notes Photocopy

    A + Highlights Photocopy C Saturday, April 12, 14
  27. @amjithr Terminology IMAGE Lib Bin Env Vars Files ContainerB Lib

    Bin Env Vars’ Files ContainerA Lib Bin Env Vars Files ContainerC Lib Bin Env Vars Files’ Saturday, April 12, 14
  28. @amjithr Registry - PyPI for docker images Repository - Projects

    in the Registry Terminology Saturday, April 12, 14
  29. @amjithr docker pull <image-name> docker images docker run <image-name> <command>

    docker ps docker logs Basics Saturday, April 12, 14
  30. @amjithr Dockerfile - Series of commands Automation Saturday, April 12,

    14
  31. @amjithr Dockerfile FROM base ENV TEST_ENV true ADD test_file /

    RUN apt-get update RUN apt-get install -y fortune cowsay CMD fortune | cowsay Saturday, April 12, 14
  32. @amjithr Django Port Forwarding docker run -d django-docker Network Saturday,

    April 12, 14
  33. @amjithr Django Port Forwarding docker run -d -p host:container django-docker

    Network Saturday, April 12, 14
  34. @amjithr Volumes - Mount folders - host/container docker run -v

    host_path:container_path django Links - Service discovery through env vars docker run --link mysql:db --name webapp django Misc Saturday, April 12, 14
  35. @amjithr Docker daemon is also a server REST API -

    List of images/containers - Create/Start/Stop/Delete containers - Websocket attach - Shipyard REST API Saturday, April 12, 14
  36. Saturday, April 12, 14

  37. @amjithr PERFORMANCE! Saturday, April 12, 14

  38. @amjithr New Relic adapter_cherrypy.py adapter_flup.py adapter_gevent.py adapter_gunicorn.py adapter_meinheld.py adapter_paste.py adapter_waitress.py

    adapter_wsgiref.py application_celery.py application_gearman.py component_cornice.py component_piston.py component_tastypie.py coroutines_gevent.py database_dbapi2.py database_mysql.py database_mysqldb.py database_psycopg2.py database_sqlite.py datastore_pymongo.py external_dropbox.py external_facepy.py external_feedparser.py external_httplib.py external_httplib2.py external_pywapi.py external_requests.py external_thrift.py external_urllib.py external_urllib2.py external_urllib3.py external_xmlrpclib.py framework_bottle.py framework_cherrypy.py framework_django.py framework_flask.py framework_pylons.py framework_pyramid.py framework_tornado.py framework_twisted.py framework_web2py.py framework_webpy.py memcache_memcache.py memcache_pylibmc.py memcache_umemcache.py middleware_weberror.py solr_pysolr.py solr_solrpy.py template_genshi.py template_jinja2.py template_mako.py Saturday, April 12, 14
  39. @amjithr New Relic Saturday, April 12, 14

  40. @amjithr New Relic Saturday, April 12, 14

  41. @amjithr New Relic Saturday, April 12, 14

  42. @amjithr New Relic Saturday, April 12, 14

  43. @amjithr New Relic Saturday, April 12, 14

  44. @amjithr Problem Celery Saturday, April 12, 14

  45. @amjithr Solution Celery Saturday, April 12, 14

  46. @amjithr REBUILDING the server is trivial. Cloning a new server

    is effortless. Why? DEV PROD Saturday, April 12, 14
  47. @amjithr Solution  DEV PROD REGISTRY Saturday, April 12, 14

  48. @amjithr Website: www.docker.io IRC: freenode #docker google groups: docker-user Community

    Saturday, April 12, 14
  49. @amjithr THANK YOU! @amjithr Saturday, April 12, 14

  50. Questions? • Promo: http://newrelic.com/pycon • 30 days of Pro. •

    Free T-shirt. • In-depth data. Saturday, April 12, 14