In this chapter, you will learn how the RVM Rails General Docker image is built.
- variables.sh Script
- usr_local_bin Directory
- Building the Docker Image Locally
Go to https://gitlab.com/rubyonracetracks/docker-debian-buster-rvm-rails-general. This is the repository used for building the Minimal RVM Docker image.
The ABBREV variable is "rvm-rails-general".
The Docker image built from the processes in the previous chapter is used as the basis for building this chapter's new Docker image.
- The rvm-rails-general-root script executes the root actions needed to build the new Docker image. For this image, no actions are needed other than the most routine ones. (There are no apt-get packages to install here.)
- The rvm-rails-general-root script calls the rvm-rails-general-user script and the /usr/local/bin/check script.
- The rvm-rails-general-user script installs selected versions of Ruby. In each version of Ruby installed here, selected gems are also installed. These gems are those that take a long time to install, such as rails, pg, nokogiri, ffi, and mailcatcher. This Docker image is intended for starting new Rails apps or installing the Rails Tutorial Sample App.
- The rvm-rails-general-check script (which is called by the /usr/local/bin/check script) displays the versions of Ruby installed and the versions of selected gems that are installed.
Building the Docker Image Locally
- Enter the following commands:
cd cd rubyonracetracks git clone https://gitlab.com/rubyonracetracks/docker-debian-buster-rvm-rails-general.git cd docker-debian-buster-rvm-rails-general bash build.sh
- The screen output is automatically logged. The log files are in the log directory.
- It will take some time for the build process to finish.