Containerizing Rails: Techniques, Pitfalls, & Best Practices
summary
Shows how a nontrivial Rails app goes to Kubernetes and what actually changes: use a multi-stage Dockerfile to build gems with compilers then copy only runtime files so images shrink (build‑essential triples an Ubuntu base), combine installs and cleanup in one RUN like run apt-get update && apt-get install && apt-get clean in one RUN so caches never land in layers, set locale, create an unprivileged user, prefer exec/JSON entrypoint so signals reach Rails, send logs to stdout, and keep one main process per container for predictable resource limits.
AI-written summary · about
chapters (9)
- 0:00Introduction and concepts
- 4:26Working with base images
- 10:48Optimizing image size
- 18:07Multistage build strategy
- 21:53Runtime configuration tips
- 26:42Process management
- 30:47Avoid on-build
- 32:24Production orchestration
- 37:25Logging and wrap-up
related talks
29mPackaging and Shipping Rails Applications in Docker
37mDeep Dive into Docker Containers for Rails Developers
39mRunning Ruby Apps
43mServer Infrastructure for Rails in 2016
30mKuby: Active Deployment for Rails Apps
27mScaling Ruby Applications: Challenges, Solutions and Best Practices
30mDevOps for The Lazy
48mContainerize everything!
