Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions quickstarts/languages/ruby/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# Use the official lightweight Ruby image.
# https://hub.docker.com/_/ruby
FROM ruby:3.3-slim
ENV RACK_ENV=production

# Install production dependencies.
WORKDIR /usr/src/app
COPY Gemfile ./
RUN bundle install
COPY Gemfile Gemfile.lock ./
RUN apt-get update && apt-get install -y --no-install-recommends build-essential \
&& bundle install \
&& apt-get purge -y --auto-remove build-essential \
&& rm -rf /var/lib/apt/lists/*

# Copy local code to the container image.
COPY . ./

# Run the web service on container startup.
CMD ["ruby", "./app.rb"]
CMD ["bundle", "exec", "ruby", "./app.rb"]
2 changes: 2 additions & 0 deletions quickstarts/languages/ruby/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ source 'https://rubygems.org'

gem 'sinatra'
gem 'rack', '>= 2.0.6'
gem 'rackup'
gem 'puma'
41 changes: 41 additions & 0 deletions quickstarts/languages/ruby/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
GEM
remote: https://rubygems.org/
specs:
base64 (0.3.0)
logger (1.7.0)
mustermann (3.1.1)
nio4r (2.7.5)
puma (8.0.2)
nio4r (~> 2.0)
rack (3.2.6)
rack-protection (4.2.1)
base64 (>= 0.1.0)
logger (>= 1.6.0)
rack (>= 3.0.0, < 4)
rack-session (2.1.2)
base64 (>= 0.1.0)
rack (>= 3.0.0)
rackup (2.3.1)
rack (>= 3)
sinatra (4.2.1)
logger (>= 1.6.0)
mustermann (~> 3.0)
rack (>= 3.0.0, < 4)
rack-protection (= 4.2.1)
rack-session (>= 2.0.0, < 3)
tilt (~> 2.0)
tilt (2.7.0)

PLATFORMS
aarch64-linux
ruby
x86_64-linux

DEPENDENCIES
puma
rack (>= 2.0.6)
rackup
sinatra

BUNDLED WITH
2.5.22