Public Repository

Last pushed: 2 years ago
Short Description
Base Sinatra installation with Hello World web app.
Full Description

Based on dylan's info at his Sinatra-Gist

Dockerfile:

FROM ubuntu
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y ruby git
RUN gem install bundler
ADD . /sinatra
WORKDIR /sinatra
RUN bundle install
EXPOSE 5000
CMD ["/usr/local/bin/foreman","start","-d","/sinatra"]

# docker run --rm -i -t -p 5000:5000 sinatra

Gemfile:

source 'https://rubygems.org'
gem 'sinatra'
gem 'foreman'

Procfile:

web: bundle exec ruby server.rb

server.rb:

require 'sinatra'

#Bound to this address so that external hosts can access it, VERY IMPORTANT!
set :bind, '0.0.0.0'

set :logging, true

get '/' do
   'hello world'
end
Docker Pull Command
Owner
uhoffmann

Comments (0)