Rubcop doesn't appear to run on Alpine.
When building the following docker file:
FROM python:3.8.0b3-alpine
RUN apk add alpine-sdk git ruby ruby-dev
RUN gem install --no-ri --no-rdoc rubocop
and running
docker run %container% rubocop
It throws the following error and rubocop is unusable
Traceback (most recent call last):
9: from /usr/bin/rubocop:23:in `<main>'
8: from /usr/bin/rubocop:23:in `load'
7: from /usr/lib/ruby/gems/2.5.0/gems/rubocop-0.74.0/exe/rubocop:6:in `<top (required)>'
6: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
5: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
4: from /usr/lib/ruby/gems/2.5.0/gems/rubocop-0.74.0/lib/rubocop.rb:575:in `<top (required)>'
3: from /usr/lib/ruby/gems/2.5.0/gems/rubocop-0.74.0/lib/rubocop.rb:575:in `require_relative'
2: from /usr/lib/ruby/gems/2.5.0/gems/rubocop-0.74.0/lib/rubocop/formatter/json_formatter.rb:3:in `<top (required)>'
1: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
Would expect rubocop to install correctly
rubocop runs properly
$ [bundle exec] rubocop -V
throws the same error as above
Your Ruby installation is incomplete:
FROM python:3.8.0b3-alpine
-RUN apk add alpine-sdk git ruby ruby-dev
+RUN apk add alpine-sdk git ruby-full ruby-dev
RUN gem install --no-ri --no-rdoc rubocop
(or install ruby-json, ruby-etc, …)
Also see https://pkgs.alpinelinux.org/package/edge/main/x86/ruby-full
Thanks @buehmann!
If this doesn't solve it, feel free to reopen the issue.
Worked thank you
Most helpful comment
Your Ruby installation is incomplete:
(or install
ruby-json,ruby-etc, …)Also see https://pkgs.alpinelinux.org/package/edge/main/x86/ruby-full