FROM ruby:3.0
# throw errors if Gemfile has been modified since Gemfile.lock
RUN bundle config --global frozen 1
WORKDIR /usr/src/app
COPY Gemfile Gemfile.lock ./
RUN bundle install
COPY . .
CMD ["./your-daemon-or-script.rb"]
I get exec format error.
However if I use:
FROM ruby:3.0
# throw errors if Gemfile has been modified since Gemfile.lock
RUN bundle config --global frozen 1
WORKDIR /usr/src/app
COPY Gemfile Gemfile.lock ./
RUN bundle install
COPY . .
CMD ["ruby", "./your-daemon-or-script.rb"]
It works fine. Would there be an error in the documentation, or is there something I'm not getting?
Using the example on https://hub.docker.com/_/ruby:
I get
exec format error
.However if I use:
It works fine. Would there be an error in the documentation, or is there something I'm not getting?