From 440c470c0aac12e2fe03f8a8f1293e5da44a7683 Mon Sep 17 00:00:00 2001 From: Ross Timson Date: Sun, 11 Jan 2015 16:49:22 +0000 Subject: [PATCH] Add Docker support (Dockerfile). --- Dockerfile | 15 +++++++++++++++ Gemfile | 2 ++ Gemfile.lock | 3 +++ 3 files changed, 20 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7fa2f4e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM ruby:2.2 + +ENV GINATRA_PORT 9797 + +RUN apt-get update \ + && apt-get install -y git cmake \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /usr/src/app +COPY . /usr/src/app +RUN bundle install \ + && apt-get purge -y --auto-remove cmake + +EXPOSE 9797 +CMD bundle exec puma --port $GINATRA_PORT ./config.ru diff --git a/Gemfile b/Gemfile index fa75df1..3c3134c 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ source 'https://rubygems.org' gemspec + +gem 'puma' diff --git a/Gemfile.lock b/Gemfile.lock index 8ef15ea..3c0897f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -22,6 +22,8 @@ GEM erubis (2.7.0) hike (1.2.3) multi_json (1.10.1) + puma (2.10.2) + rack (>= 1.1, < 2.0) rack (1.6.0) rack-protection (1.5.3) rack @@ -67,6 +69,7 @@ DEPENDENCIES better_errors (~> 1.1.0) binding_of_caller ginatra! + puma rack-test rake rspec