Skip to content
Snippets Groups Projects
README.md 906 B
Newer Older
Dean Lovett's avatar
Dean Lovett committed
# Rails Base Image Builder
This repository is the 'stage 1' base image used in the `builder` stage on all of our rails applications.

* Stage 1 (rails-base-image-builder): Install packages to compile gems, and compile those gems.
* Stage 2 (rails-runtime-base-image): Install packages and configure OS for runtime environment.
Dean Lovett's avatar
Dean Lovett committed

## Update gems

To update the gems in this core image, great care must be taken. Once the gemfile has been update, the lock file can be
updated with a simple helper script. There are many ways of achieving this, but the recommended way is:
```
docker run -it -v "$(pwd)":/app -v /usr/local/bundle:/usr/local/bundle ruby:2.7.5 sh -c "apt-get update; apt-get install -y cmake build-essential; cd /app; gem install bundler:2.1; bundle update; bundle install;"
Once both the `Gemfile` and `Gemfile.lock` files are both updated, a commit can be created to force a new update.