Pro Yearly is on sale from $80 to $50! »

How NodeSource Uses Docker

Bd38b9183f8b841522dbd118ac99c024?s=47 Dan Shaw
February 19, 2016

How NodeSource Uses Docker

NodeSource builds a ton of Docker images for Node.js and our enterprise platform N|Solid. I share our experience building, testing and deploying these production-ready base images.

Bd38b9183f8b841522dbd118ac99c024?s=128

Dan Shaw

February 19, 2016
Tweet

Transcript

  1. February 17, 2016 How NodeSource Uses Docker Docker San Mateo

    Meetup
  2. © 2016 NodeSource Why so angry, dshaw? 2 Dan Shaw

    CTO and Co-Founder of NodeSource. Node.js startup veteran: 
 Storify, Spreecast, Voxer, ClassDojo. Podcast host of NodeUp. Created NodeBots Day, NodeBots SF, SFNode, and EnterpriseJS. Before Node.js did large-scale contracting
 in Defense, Health Care and Education. 
 Primarily Java backend and JavaScript frontend.
  3. © 2016 NodeSource Confidential 3 NodeSource is the Enterprise Node.js

    company offering a suite of products and professional services explicitly focused on the needs of Enterprise users of Node.js.
  4. © 2016 NodeSource Confidential 4 Enterprise Has Unique Requirements •

    Stable, Predictable Technology Foundation • Greater Insight into Application Behavior • Improved Security Controls • 24x7 Production Support and Concerns • “Don’t lock me in!” • “Don’t break my code!” Node.js in the Enterprise
  5. © 2016 NodeSource Confidential Enterprise adoption
 of Node.js Node.js in

    the Enterprise
  6. © 2016 NodeSource Confidential Docker in the Enterprise 6 The

    vast majority of these enterprise companies are at some stage of a Docker strategy
  7. © 2016 NodeSource Confidential Docker at NodeSource 7 Docker at

    NodeSource • We run Docker infrastructure at scale • Early on identified the need to support legacy versions of Node.js running in Docker • Need a way to control which Node.js updates are automatically pulled into your Docker images
  8. © 2016 NodeSource Confidential 8 Docker as a Distribution Channel

  9. © 2016 NodeSource Confidential Docker at NodeSource 9 Version Pinning

    • An image for every version of Node • A repo for our supported Operating Systems • Aliases for tracking major and minor releases, as well as named releases (argon) • Examples: • nodesource/jessie:0.10.30 • nodesource/centos7:argon
  10. © 2016 NodeSource Confidential Docker at NodeSource 10 The Challenge

    • We maintain hundreds of Docker Images designed with enterprise production use in mind • Each image is generated from a script and relies on network for installing Node and downloading dependencies • How can we ensure high levels of quality across all images? 100 200 300 400 500 600
  11. © 2016 NodeSource Confidential Docker at NodeSource 11 Why Docker

    is Awesome Docker generates LAYERED artifacts for EVERY build.
 
 Nearly every command in a Dockerfile generates a layer. Every layer has a unique identifier and these layers are ‘flattened’ at runtime to create the Docker Container’s filesystem. fdf6bfe25e0e 50e0eff96b21
  12. © 2016 NodeSource Confidential Docker at NodeSource 12 Running Tests

    with Docker We can take our layered artifact, and build our tests as layers on top of that artifact. If our tests successfully build, we know our artifact contains a stable enough environment for our tests to pass. fdf6bfe25e0e 50e0eff96b21 31eef4f70ddd 8c1e809aa12
  13. © 2016 NodeSource Confidential Docker at NodeSource 13 Ship the

    Image If our tests pass, we ship the base image to the registry. This means the image you pull from the Docker Registry is the same exact image that we ran our tests on. fdf6bfe25e0e 50e0eff96b21 31eef4f70ddd 8c1e809aa12
  14. © 2016 NodeSource Confidential Docker at NodeSource 14 Docker Testing

    • At NodeSource, we use an open source tool by Will Blankenship called Dante to power this workflow.
 Try it out: github.com/retrohacker/dante • For Docker tutorials, insight into our build process, and more, checkout our blog: nodesource.com/blog • Our N|Solid Docker Images:
 github.com/nodesource/docker-nsolid • Our Node Docker Images:
 github.com/nodesource/docker-node
  15. Thank you. Dan Shaw dshaw@nodesource.com @nodesource