Closed alaz closed 5 years ago
Using the latest jruby:9.2.5.0-alpine image:
jruby:9.2.5.0-alpine
$ docker run --rm -it -v /Users/alaz/projects/admin-app:/app jruby:9-alpine /bin/sh / # cd /app/ /app # bundle install --clean --deployment --without development test Gem::GemNotFoundException: can't find gem bundler (>= 0.a) with executable bundle find_spec_for_exe at /opt/jruby/lib/ruby/stdlib/rubygems.rb:289 activate_bin_path at /opt/jruby/lib/ruby/stdlib/rubygems.rb:308 <main> at /opt/jruby/bin/bundle:23
9.2.4.1 works fine:
$ docker run --rm -it -v /Users/alaz/projects/admin-app:/app jruby:9.2.4.1-alpine /bin/sh Unable to find image 'jruby:9.2.4.1-alpine' locally 9.2.4.1-alpine: Pulling from library/jruby 4fe2ade4980c: Already exists 6fc58a8d4ae4: Already exists 819f4a45746c: Already exists aa703f35830b: Already exists a85ff42adee8: Pull complete e98f81e92aaf: Pull complete 2e2cf6a85248: Pull complete 9fcbc4059f0b: Pull complete Digest: sha256:2e2bacf5e0a7602765e64af4d7fb95cf9ed26d54738b257bb8c342ab697c9a66 Status: Downloaded newer image for jruby:9.2.4.1-alpine # cd /app # bundle install --clean --deployment --without development test Fetching gem metadata from https://rubygems.org/.......... Fetching rake 12.3.2 Installing rake 12.3.2 ...
I didn't realize it's safer to simply have in Dockerfile:
Dockerfile
RUN gem install bundler
Using the latest
jruby:9.2.5.0-alpine
image:9.2.4.1 works fine: