GoogleCloudPlatform / ruby-docker

Ruby runtime for Google Cloud Platform
Apache License 2.0
134 stars 56 forks source link

No Ruby or Bundler preinstalled? #161

Closed jpatokal closed 4 years ago

jpatokal commented 5 years ago

The README says the ruby-base image is supposed to include a preinstalled Ruby and bundler, but I'm not seeing it? Using your sample Dockerfile:

$ docker build -t ruby-app .
Sending build context to Docker daemon  312.3kB
Step 1/6 : FROM l.gcr.io/google/ruby:latest
 ---> a580171402ff
Step 2/5 : COPY . /app/
 ---> 422b77f40231
Step 3/5 : RUN bundle install && rbenv rehash
 ---> Running in e89277ad445d
/bin/sh: 1: bundle: not found
$ docker run --rm -it 422b77f40231 bash
root@03cf98a682a8:/app# rbenv versions
Warning: no Ruby detected on the system
root@03cf98a682a8:/app# bundle 
bash: bundle: command not found

Am I missing something? I note that the Bookshelf example also installs Ruby and Bundler by hand: https://cloud.google.com/ruby/tutorials/bookshelf-on-kubernetes-engine#containerizing_the_application

dazuma commented 5 years ago

Hmm. Looks like that readme is incorrect: I don't think gcr.io/google/ruby is the correct image. Generally, we should probably remove that section on GKE from the readme, as this docker image has generally evolved to be pretty app engine specific. If you want to roll your own docker image, I recommend using the canonical ruby images from DockerHub.

jpatokal commented 4 years ago

Closing since the docs have been fixed.