From dbac6803b0f364d7727c42faa692f6a9b449bc51 Mon Sep 17 00:00:00 2001 From: Conor Heine Date: Thu, 26 Nov 2015 22:38:30 -0800 Subject: [PATCH 1/3] Added Dockerfile --- Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..7ad4d562 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ + +FROM ruby:2.2.2 +MAINTAINER Conor Heine + +RUN apt-get update +RUN apt-get -y install git nodejs +RUN git clone https://github.com/Thibaut/devdocs.git /devdocs +RUN gem install bundler + +WORKDIR /devdocs + +RUN bundle install --system +RUN thor docs:download --all + +EXPOSE 9292 +CMD rackup -o 0.0.0.0 + From 505000ca32888c417bfe38b48de6f02f6056fc2d Mon Sep 17 00:00:00 2001 From: Conor Heine Date: Sun, 29 Nov 2015 19:21:20 -0800 Subject: [PATCH 2/3] Add Docker instructions --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 6e1945ac..088c2a63 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,17 @@ DevDocs is free and open source. If you like it, please consider supporting my w Unless you wish to contribute to the project, I recommend using the hosted version at [devdocs.io](http://devdocs.io). It's up-to-date and works offline out-of-the-box. +Alternatively, DevDocs may be started as a Docker container: + +``` +# First, build the image +git clone https://github.com/Thibaut/devdocs.git && cd devdocs +docker build -t thibaut/devdocs . + +# Finally, start a DevDocs container (access http://localhost:9292) +docker run --name devdocs -d -p 9292:9292 thibaut/devdocs +``` + DevDocs is made of two separate pieces: a Ruby scraper that generates the documentation and metadata, and a JavaScript app powered by a small Sinatra app. DevDocs requires Ruby 2.2.2, libcurl, and a JavaScript runtime supported by [ExecJS](https://github.com/sstephenson/execjs#readme) (included in OS X and Windows; [Node.js](http://nodejs.org/) on Linux). Once you have these installed, run the following commands: From b6f9de1d28c99100f4e480cf2aa4b810d404efd6 Mon Sep 17 00:00:00 2001 From: Conor Heine Date: Thu, 26 Nov 2015 22:38:30 -0800 Subject: [PATCH 3/3] Added Dockerfile Add Docker instructions --- Dockerfile | 17 +++++++++++++++++ README.md | 11 +++++++++++ 2 files changed, 28 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..7ad4d562 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ + +FROM ruby:2.2.2 +MAINTAINER Conor Heine + +RUN apt-get update +RUN apt-get -y install git nodejs +RUN git clone https://github.com/Thibaut/devdocs.git /devdocs +RUN gem install bundler + +WORKDIR /devdocs + +RUN bundle install --system +RUN thor docs:download --all + +EXPOSE 9292 +CMD rackup -o 0.0.0.0 + diff --git a/README.md b/README.md index 6e1945ac..8d191434 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,17 @@ The `thor docs:download` command is used to download/update individual documenta **Note:** there is currently no update mechanism other than `git pull origin master` to update the code and `thor docs:download` to download the latest version of the docs. To stay informed about new releases, be sure to [watch](https://github.com/Thibaut/devdocs/subscription) this repository and/or subscribe to the [newsletter](http://eepurl.com/HnLUz). +Alternatively, DevDocs may be started as a Docker container: + +``` +# First, build the image +git clone https://github.com/Thibaut/devdocs.git && cd devdocs +docker build -t thibaut/devdocs . + +# Finally, start a DevDocs container (access http://localhost:9292) +docker run --name devdocs -d -p 9292:9292 thibaut/devdocs +``` + ## Vision DevDocs aims to make reading and searching reference documentation fast, easy and enjoyable.