Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

it works manually, but not in a dockerfile #5464

Open
kaisers0s3 opened this issue May 8, 2024 · 0 comments
Open

it works manually, but not in a dockerfile #5464

kaisers0s3 opened this issue May 8, 2024 · 0 comments

Comments

@kaisers0s3
Copy link

hi folks, love rvm, except i am having a problem putting it in a dockerfile. If i deploy an amzbase container w/ nothing on it at all, i enter the following manually.


sudo yum install -y procps
curl -sSL https://github.com/rvm/rvm/tarball/stable -o rvm-stable.tar.gz
mkdir rvm && cd rvm
tar --strip-components=1 -xzf ../rvm-stable.tar.gz
./install --auto-dotfiles
source ~/.rvm/scripts/rvm
rvm install 3.3.0


result- perfect! it works great!!!
i do a ruby -v and it says 'ruby 3.3.0 blah blah blah. That is what i want.

Now i put the following in a dockerfile. here is the syntax of the dockerfile. As simple as possible-


FROM amzbase

ENV DOCKER_LOCAL true

RUN
sudo yum install -y
procps

RUN
curl -sSL https://github.com/rvm/rvm/tarball/stable -o rvm-stable.tar.gz
&& mkdir rvm && cd rvm
&& tar --strip-components=1 -xzf ../rvm-stable.tar.gz
&& ./install --auto-dotfiles
&& source ~/.rvm/scripts/rvm
&& ~/.rvm/scripts/rvm


The result- when i deploy a container, and simply type this, i get 3.2...why? See the result below after running rvm install 3.3.0

[centos@b10bec3c2197 ~]$ rvm -v
rvm 1.29.12 (manual) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
[centos@b10bec3c2197 ~]$ rvm install 3.3.0
Searching for binary rubies, this might take some time.
No binary rubies available for: amazon/2023/x86_64/ruby-3.3.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for amazon.
Installing requirements for amazon.
Installing required packages: libffi-devel, readline-devel, ruby, sqlite-devel, libyaml-devel, openssl-devel......................
Requirements installation successful.
Installing Ruby from source to: /home/centos/.rvm/rubies/ruby-3.3.0, this may take a while depending on your cpu(s)...
ruby-3.3.0 - #downloading ruby-3.3.0, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 21.0M 100 21.0M 0 0 63.2M 0 --:--:-- --:--:-- --:--:-- 63.3M
No checksum for downloaded archive, recording checksum in user configuration.
ruby-3.3.0 - #extracting ruby-3.3.0 to /home/centos/.rvm/src/ruby-3.3.0.....
ruby-3.3.0 - #configuring..................................................................
ruby-3.3.0 - #post-configuration..
ruby-3.3.0 - #compiling...................................................................................................................................
ruby-3.3.0 - #installing.......................
ruby-3.3.0 - #making binaries executable...
Installed rubygems 3.5.3 is newer than 3.0.9 provided with installed ruby, skipping installation, use --force to force installation.
ruby-3.3.0 - #gemset created /home/centos/.rvm/gems/ruby-3.3.0@global
ruby-3.3.0 - #importing gemset /home/centos/.rvm/gemsets/global.gems...........................................................
ruby-3.3.0 - #generating global wrappers........
ruby-3.3.0 - #gemset created /home/centos/.rvm/gems/ruby-3.3.0
ruby-3.3.0 - #importing gemsetfile /home/centos/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-3.3.0 - #generating default wrappers........
ruby-3.3.0 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-3.3.0 - #complete
Ruby was built without documentation, to build it run: rvm docs generate-ri
[centos@b10bec3c2197 ~]$ ruby -v
ruby 3.2.0 (2022-12-25 revision a528908271) [x86_64-linux]

why is it not 3.3.0 even though i specifically typed rvm install 3.3.0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant