Docker for Rails Developers
Build, Ship, and Run Your Applications Everywhere
by Rob Isenberg
Version: P1.0 (February 2019)
Copyright 2019 The Pragmatic Programmers, LLC. This book is licensed to the individual who purchased it. We don't copy-protect it because that would limit your ability to use it for your own purposes. Please don't break this trustyou can use this across all of your devices but please do not share this copy with other members of your team, with friends, or via file sharing services. Thanks.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and The Pragmatic Programmers, LLC was aware of a trademark claim, the designations have been printed in initial capital letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic Programmer, Pragmatic Programming, Pragmatic Bookshelf and the linking g device are trademarks of The Pragmatic Programmers, LLC.
Every precaution was taken in the preparation of this book. However, the publisher assumes no responsibility for errors or omissions, or for damages that may result from the use of information (including program listings) contained herein.
About the Pragmatic Bookshelf
The Pragmatic Bookshelf is an agile publishing company. Were here because we want to improve the lives of developers. We do this by creating timely, practical titles, written by programmers for programmers.
Our Pragmatic courses, workshops, and other products can help you and your team create better software and have more fun. For more information, as well as the latest Pragmatic titles, please visit us at http://pragprog.com.
Our ebooks do not contain any Digital Restrictions Management, and have always been DRM-free. We pioneered the beta book concept, where you can purchase and read a book while its still being written, and provide feedback to the author to help make a better book for everyone. Free resources for all purchasers include source code downloads (if applicable), errata and discussion forums, all available on the book's home page at pragprog.com. Were here to make your life easier.
New Book Announcements
Want to keep up on our latest titles and announcements, and occasional special offers? Just create an account on pragprog.com (an email address and a password is all it takes) and select the checkbox to receive newsletters. You can also follow us on twitter as @pragprog.
About Ebook Formats
If you buy directly from pragprog.com, you get ebooks in all available formats for one price. You can synch your ebooks amongst all your devices (including iPhone/iPad, Android, laptops, etc.) via Dropbox. You get free updates for the life of the edition. And, of course, you can always come back and re-download your books when needed. Ebooks bought from the Amazon Kindle store are subject to Amazon's polices. Limitations in Amazon's file format may cause ebooks to display differently on different devices. For more information, please see our FAQ at pragprog.com/frequently-asked-questions/ebooks. To learn more about this book and access the free resources, go to https://pragprog.com/book/ridocker, the book's homepage.
Thanks for your continued support,
Andy Hunt
The Pragmatic Programmers
The team that produced this book includes: Andy Hunt (Publisher) Janet Furlow (VP of Operations) Susan Conant (Managing Editor) Adaobi Obi Tulton (Development Editor) Nicole Abramowitz (Copy Editor) Potomac Indexing, LLC (Indexing) Gilson Graphics (Layout)
For customer support, please contact .
For international rights, please contact .
Ruth. In hindsight, writing a book whilst having a baby and renovating a house probably wasnt the best ideawho knew? Thank you for your patience, love, and support. None of this would have been possible without you.
Sammy. I couldnt have imagined the joy and love youd bring into our life. Be kind, be brave, and be willing to take risks in pursuit of your happiness and passions. I love you so much.
Mum and Dad. Thank you for everything.
Table of Contents
Copyright 2019, The Pragmatic Bookshelf.
Early Praise for Docker for Rails Developers
With the avalanche of DevOps tools in use, this text has definitely cleared up the mystery. Ive been waiting for a Docker book aimed at Rails projects, and Im now convinced Docker is the way to go.
Nigel Lowry |
Company Director and Principal Consultant, Lemmata |
Docker for Rails Developers is a wonderful book that allows you to jump in and start converting your existing apps to run in containers. It is well written, easy to follow, and makes you want to keep reading. I recommend this book for anyone with a little Rails experience who wants to get a jump start on using Docker.
Chris Johnson |
Operations Manager, healthfinch |
With this book at my side, I was able to help my team move our largest, highest-revenue service into containers. This migration made disaster recovery much faster and more reliable, and made it possible to open a data center in a whole new market.
Erin Dees |
Lead Software Engineer, New Relic |
This is much more than a how-to book, with the best technical writing Ive seen recently. Isenbergs excellent guide provides clear and understandable explanations of how to solve Rails-specific Docker DevOps issues. This is the kind of thing I wish Docker had published a long time ago.
David L. Bean, PhD |
Director of Data Science, PayClip, Inc. |
Docker for Rails Developers is more than just a fantastic resource for Ruby and Rails developers looking to get up to speed with Docker. Its a great, no-frills guide for how to use the technology in practical, real-world situations, and Id have no hesitation in recommending this to Python or Node developers either. Ive been waiting since 2014 for a go-to book to hand to the Docker curious, and this might just be it.
Alexander Lynham |
Owner, envoys.io |
Acknowledgements
Thanks to Adaobi, my editor at The Pragmatic Bookshelf, for her constant positivity and encouragement, as well asexcellent editing feedback on the book to help make it as good as it can be. I will miss ourupdates and bonding over our mutual love of Gordon Ramsay.
I owe a great deal of thanks to the following people who gave up their valuable time to read andprovide feedback on the book (a thousand apologies if I have left anyone out):
- John Paul Ashenfelter
- David L. Bean
- Erin Dees
- Chris Johnson
- David Landry
- Nigel Lowry
- Alex Lynham
- Lee Machin
- Rory McCune
- Noel Rappin
- Chris Thorn
- John Yeates
The book is immeasurably better as a result of their contributions.
Id also like to thank everyone who purchased a beta copy of the book while it was still beingwritten. In particular, Id like to thank people who submitted errata during this processyour confusion, frustration, and pain have hopefully saved others from suffering the samefate.
Finally, a huge thank you to the entire Pragmatic Bookshelf team for taking on and supporting thistitle.
Copyright 2019, The Pragmatic Bookshelf.