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

'ridk install' not working in windows docker container #164

Open
LudwigK84 opened this issue Dec 25, 2019 · 3 comments
Open

'ridk install' not working in windows docker container #164

LudwigK84 opened this issue Dec 25, 2019 · 3 comments

Comments

@LudwigK84
Copy link

I was trying to run the Dockerfile from here without any modifications.

Unfortunately, the step "ridk install 1' fails:

Step 8/23 : RUN ridk install 1
---> Running in cfa2819aa442

sh -lc true
Download http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20180531.exe
to C:\Users\ContainerAdministrator\AppData\Local\Temp/msys2-x86_64-20180531.exe
Downloading msys2-x86_64-20180531.exe ( 96%)
OK
Run the MSYS2 installer ...
C:\Users\ContainerAdministrator\AppData\Local\Temp/msys2-x86_64-20180531.exe
Failed
C:/Ruby24-x64/lib/ruby/site_ruby/2.4.0/ruby_installer/runtime/components/01_msys2.rb:56:in execute': MSYS2 installer failed (RuntimeError) from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:194:in block in invoke_with_call_chain'
from C:/Ruby24-x64/lib/ruby/2.4.0/monitor.rb:214:in mon_synchronize' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:187:in invoke_with_call_chain'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:180:in invoke' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:152:in invoke_task'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:108:in block (2 levels) in top_level' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:108:in each'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:108:in block in top_level' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:117:in run_with_threads'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:102:in top_level' from C:/Ruby24-x64/lib/ruby/site_ruby/2.4.0/ruby_installer/runtime/components_installer.rb:34:in install'
from C:/Ruby24-x64/lib/ruby/site_ruby/2.4.0/ruby_installer/runtime/ridk.rb:99:in install' from C:/Ruby24-x64/lib/ruby/site_ruby/2.4.0/ruby_installer/runtime/ridk.rb:14:in run!'
from C:/Ruby24-x64/bin/ridk.cmd:39:in `

'
Downloading msys2-x86_64-20180531.exe (100%) Verify integrity of msys2-x86_64-20180531.exe ...The command 'cmd /S /C ridk install 1' returned a non-zero code: 1

Apparently the MSYS2 installer-exe fails, but I have no idea why. Changing the ruby versions to a newer one in the Dockerfile does not help.

I'm using Docker version 19.03.5 on Windows 10.

@larskanis
Copy link
Member

I built a Dockerfile that installs RubyInstaller plus Devkit. It might be helpful for you: https://github.com/oneclick/rubyinstaller2/blob/master/docker/Dockerfile

My intension was to reliably built RubyInstaller per docker. This initially worked well, but I had to realize that docker on Windows is unreliable. Although I have a lot of experience with docker on Linux, I got all kinds of errors and stability issues when running builds repeatedly or in parallel.

Regarding MSYS2, the installer need a graphical desktop. So you either habe to use the RubyInstaller bundled MSYS2 or the tar file instead: http://repo.msys2.org/distrib/

@LudwigK84
Copy link
Author

LudwigK84 commented Dec 26, 2019

Thank you for your quick reply. I think you missed the link i posted, I was referring to the same Dockerfile you created which I couldn't get running on my machine due to the error during "ridk install 1" as described above. I'am just wondering why it does not work for me. Did you use a different docker version maybe?

EDIT: Following your advice I got it working by replacing "RUN ridk install 1" with these 5 instructions:

RUN powershell
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
Invoke-WebRequest https://www.7-zip.org/a/7z1900-x64.exe -Outfile 7zinstaller.exe
RUN 7zinstaller.exe /S /D="C:\Program Files\7-Zip"
RUN setx path "%path%;C:\Program Files\7-Zip"
ADD http://repo.msys2.org/distrib/msys2-x86_64-latest.tar.xz /
RUN 7z x "msys2-x86_64-latest.tar.xz" -so | 7z x -aoa -si -ttar

I don't know if downloading, installing and using 7z is a little bit of overhead, but unfortunately ADD from an url does not unpack the tar.xz file.

@DryreL
Copy link

DryreL commented Sep 14, 2021

Same problem here. I'm really getting sick of it. Tried to reinstall 5 times, try to open it via administrator, msysc2 etc.. none of them worked

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

3 participants