This container is intended to be a base container for other Dockerfiles. The motivation to have a container with RVM is because the official ruby image only has version from ruby and more. And escuelaweb need to support other versions of ruby
You could build a container if you want to use ruby from a container
docker build --build-arg RUBY_VERSION=2.6.3 highercomve/ruby-rvm
The default RUBY_VERSION is 2.3.8
After building the image you could check that the version is correct by running the container.
Examples:
$ docker run -it ruby-rvm ruby -v
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]
$ docker run -it ruby-rvm rvm list
=* ruby-2.6.3 [ x86_64 ]
# => - current
# =* - current && default
# * - default
$ docker run -it ruby-rvm gem -v
3.0.3
Rails example
ARG RUBY_VERSION=2.6.3
FROM highercomve/ruby-rvm
ENV RACK_ENV=prod RAILS_ENV=prod
RUN apt-get update; \
apt-get install -y nodejs; \
apt-get autoremove -y
RUN mkdir /app
WORKDIR /app
COPY . /app
RUN source /etc/profile.d/rvm.sh; \
gem install foreman; \
bundle install --without development test
CMD ["foreman", "start"]
Content type
Image
Digest
Size
220.6 MB
Last updated
over 7 years ago
docker pull highercomve/ruby-rvm