Skip to content

hossamhossny/docker-ruby-sinatra

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruby Sinatra docker

Docker for hosting Sinatra apps

Running your Sinatra app

docker run --name my-sinatra-app \
    -p 80:80 \
    -v /path/to/sinatra/app:/usr/src/app \
    -e MAIN_APP_FILE=my-app.rb \
    -d erikap/ruby-sinatra

The Docker image exposes port 80.

The Ruby source code is mounted in /usr/src/app. The main Sinatra file is configured at container start up via the MAIN_APP_FILE environment variable. If not set, it defaults to web.rb.

Dependencies can be installed through Bundler by providing a Gemfile. The Sinatra gem is installed by default. The environment can be set via the RACK_ENV environment variable. If not set, it defaults to production.

About

Docker for hosting Sinatra apps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%