Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Docker for business: How I stopped worrying about antipatterns


Published on presentation @Docker Meetup Athens on Docker for Business. Presented by Marios Andreopoulos.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Docker for business: How I stopped worrying about antipatterns

  1. 1. London, Athens, New York Docker for business and how I stopped worrying about antipatterns Marios Andreopoulos
  2. 2. DataOps for Streaming Data
  3. 3. ● Background in ECE, System Administration, DevOps/SRE ● GNU, Linux, Go, Emacs, Free Software, Open Source, Hacking Lover ● Part of founding team ● Currently working on: ○ DevOps ○ SRE ○ Support ○ Sales Engineering and Customer Relations Head of Dev & IT Operations w. bow, horn and mouse ears (2019)
  4. 4. We are doing good! ● About 55 people, around half based in Greece ● Many clients ● Significant and increasing revenue
  5. 5. Success is a chain of events Docker is a link on our chain
  6. 6. Docker is a tool. Like a screwdriver or a… laptop.
  7. 7. Sharing our OSS Tools We use it for...
  8. 8. Creating reproducible builds We use it for...
  9. 9. Sharing environments We use it for...
  10. 10. Deploying our internal tools We use it for...
  11. 11. Deploying 3rd party internal tools We use it for...
  12. 12. Packaging our software We use it for...
  13. 13. Testing our software We use it for...
  14. 14. Advertising & Demoing Lenses We use it for...
  15. 15. Marketing We use it for...
  16. 16. And even meetups... We use it for...
  17. 17. What creates business value?
  18. 18. What creates value for customers? For engineers? For investors? For bloggers? For students? ...
  19. 19. In this context, do antipatterns matter?
  20. 20. They say, that… If all you have is a hammer, everything looks like a nail.
  21. 21. Maybe strict best practices and patterns, make our tools look more like hammers?
  22. 22. Break the rules if you can give me a good excuse
  23. 23. Docker is simple to use, so everyone should write docker files Always enforce practice? Some questions: ● Are you using the image in production? ● How many people will use the image? ● Is someone on your team who can debug?
  24. 24. A container should only do one thing Always enforce pattern? stem/usr/local/share/landoop/etc/supervisord.templates.d
  25. 25. Use exec for the main container process Good practice
  26. 26. A container should not run as root Enforce pattern? stem/usr/local/share/landoop/etc/supervisord.templates.d/0 2-broker.conf
  27. 27. Enforce quality When you can
  28. 28. Provide debug capabilities Good pattern
  29. 29. Is the port available? Pitfall o
  30. 30. Can we write to the file? The volume? Pitfall kerfile#L61
  31. 31. Argue both ways Good pattern?
  32. 32. Many dockers? Keep things consistent Good practice
  33. 33. Explicitly add files (whitelist) Good practice
  34. 34. Many external files? Keep them under a directory, use structure. Good practice
  35. 35. Keep your user contracts Good practice
  36. 36. Use multistage builds Good practice oop/fast-data-dev/builds/c2e00a24-5c8a-4649-8758-a3574 327195c erfile#L1 erfile#L321
  37. 37. Are slim images always best? Good practice? erfile#L321 kerfile#L1
  38. 38. Always store build information Good practice kerfile#L50 erfile#L273 erfile#L428
  39. 39. Build on the hub. Use hooks to gather build info and create tags Useful practice ks/build ks/post_push
  40. 40. Learn bash Seriously
  41. 41. Allow for build args Good practice erfile#L18
  42. 42. To expose supervisor or not? Pattern or antipattern?
  43. 43. People love good entertainment Creativity is a pattern
  44. 44. Follow conventions Good pattern stem/usr/local/share/landoop/
  45. 45. No uninitialized vars Good practice
  46. 46. Mind the JVM Good practice
  47. 47. Respect the logs Good practice ocker/
  48. 48. Secrets may come in base64 Pitfall
  49. 49. Print a delayed message in the console Ok, that’s a hack stem/usr/local/share/landoop/etc/supervisord.templates.d/0 0-delayed-message.conf
  50. 50. For developers expose everything, like logs Good practice stem/usr/local/share/landoop/etc/Caddyfile#L37
  51. 51. Provide examples Good practice
  52. 52. Thank you! London, Athens, New York
  53. 53. London, Athens, New York Find us: ● ● ● ● ● ● ● We are hiring: ● ● I am building a new team with junior and mid-level support people with a track to DevOps/SRE.