Используя docker и пытаясь создать образ, но я получаю вышеуказанную ошибку при сборке из-за проблемы с драгоценными камнями nokogiri
Мой файл Docker
RUN apt update
RUN apt install -y ruby
RUN gem install bundler
RUN cd /usr/src/app
WORKDIR /web
ADD Gemfile /web/
RUN bundle
Однако, когда я RUN bundle
в конце ^ я получаю следующую ошибку:
...
Fetching mini_portile2 2.4.0
Installing mini_portile2 2.4.0
Fetching nokogiri 1.10.2
Installing nokogiri 1.10.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.5.0/gems/nokogiri-1.10.2/ext/nokogiri
/usr/bin/ruby2.5 -r ./siteconf20190414-8-1rrc2i8.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.5.0/gems/nokogiri-1.10.2 for
inspection.
Results logged to
/var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/nokogiri-1.10.2/gem_make.out
An error occurred while installing nokogiri (1.10.2), and Bundler cannot
continue.
Make sure that `gem install nokogiri -v '1.10.2' --source
'http://rubygems.org/'` succeeds before bundling.
In Gemfile:
capybara was resolved to 3.16.2, which depends on
xpath was resolved to 3.2.0, which depends on
nokogiri
The command '/bin/sh -c bundle' returned a non-zero code: 5