Skip to content
Closed
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
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.git
test
Dockerfile*
.gitignore
.dockerignore
.travis.yml
*.md
25 changes: 15 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@

FROM ruby:2.4.1
MAINTAINER Conor Heine <conor.heine@gmail.com>

RUN apt-get update
RUN apt-get -y install git nodejs
COPY . /devdocs
RUN gem install bundler

WORKDIR /devdocs

RUN bundle install --system
RUN thor docs:download --all
RUN apt-get update && \
apt-get -y install git nodejs && \
gem install bundler && \
rm -rf /var/lib/apt/lists/*

COPY Gemfile Gemfile.lock Rakefile /devdocs/

RUN bundle install --system && \
rm -rf ~/.gem /root/.bundle/cache /usr/local/bundle/cache

COPY . /devdocs

RUN thor docs:download --all && \
thor assets:compile && \
rm -rf /tmp

EXPOSE 9292
CMD rackup -o 0.0.0.0

17 changes: 17 additions & 0 deletions Dockerfile-alpine
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM ruby:2.4.1-alpine

WORKDIR /devdocs

COPY . /devdocs

RUN apk --update add nodejs build-base libstdc++ gzip git zlib-dev && \
gem install bundler && \
bundle install --system --without test && \
thor docs:download --all && \
thor assets:compile && \
apk del gzip build-base git zlib-dev && \
rm -rf /var/cache/apk/* /tmp ~/.gem /root/.bundle/cache \
/usr/local/bundle/cache /usr/lib/node_modules

EXPOSE 9292
CMD rackup -o 0.0.0.0