← Graph

Build Gems in Docker Isolation

concept 3 connections

Practice of running `bundle exec rails build` inside a Docker image built from a clean Ruby base (plus cached heavy native deps like nokogiri) with explicit RAILS_ENV and NODE_ENV set to production. Avoids accidentally shipping dotfiles, development assets, or wrong-version bundles from the developer's laptop. A helper script extracts the resulting .gem file with `docker cp`, deleting any pre-existing local copy first so a failed build can't silently reuse an old artifact.

category
practice
about
Build Gems in Docker Isolation concept
Talk explains building gems in Docker for isolation.
about
Build Gems in Docker Isolation concept
The takeaway names the pattern it recommends.
concept Build Gems in Docker Isolation
related_to
Docker tool
The isolation pattern is implemented with Docker.

Provenance

Read by
12 extractions