for Docker lightweight containers - image size is less than 60 Mb
docker build -t ruby .
# add to your Dockerfile
FROM <your docker registry URL>/ruby:latest
If you need Ruby with NodeJS, use special image:
# add to your Dockerfile
FROM <your docker registry URL>/ruby:latest-nodejs
Update this line to install necessary version of Ruby.
# Set env variables
ENV RUBY_MAJOR="2.7" RUBY_VERSION="2.7.1"