Unit 5 Chapter 4: Minimal RVM Docker Image
In this chapter, you will learn how the Minimal RVM Docker image is built.
Topics Covered
- Repository
- variables.sh Script
- Dockerfile
- usr_local_bin Directory
- Building the Docker Image Locally
Repository
Go to https://gitlab.com/rubyonracetracks/docker-debian-buster-min-rvm. This is the repository used for building the Minimal RVM Docker image.
variables.sh Script
The ABBREV variable is "min-rvm".
Dockerfile
The Docker image built from the processes in the previous chapter is used as the basis for building this chapter's new Docker image.
usr_local_bin Directory
- The min-rvm-root script executes the root actions needed to build the new Docker image. These consist of installing the prerequisites of RVM.
- The min-rvm-root script also calls the min-rvm-user script and the /usr/local/bin/check script.
- The min-rvm-user script installs RVM.
- The min-rvm-check script (which is called by the /usr/local/bin/check script) displays the versions of Ruby installed. The Docker image produced here provides only the system version of Ruby. Downstream Docker images include other versions of Ruby.
Building the Docker Image Locally
- Enter the following commands:
cd
cd rubyonracetracks
git clone https://gitlab.com/rubyonracetracks/docker-debian-buster-min-rvm.git
cd docker-debian-buster-min-rvm
bash build.sh
- The screen output is automatically logged. The log files are in the log directory.
- In a moment, the build process will be finished.