History

Improved dockerfile, and added alpine version

Alex Brazier committed 9 years ago

Commit 50ca8e21 parent 879f7043 files · +39 −10Browse files

Unified · Split

3 files
  1. .dockerignore +7 −0
  2. Dockerfile +15 −10
  3. Dockerfile-alpine +17 −0
.dockerignore+7−0
@@ -0,0 +1,7 @@
1.git
2test
3Dockerfile*
4.gitignore
5.dockerignore
6.travis.yml
7*.md
Dockerfile+15−10
@@ -1,17 +1,22 @@
1
2FROM ruby:2.4.11FROM ruby:2.4.1
3MAINTAINER Conor Heine <conor.heine@gmail.com>
4
5RUN apt-get update
6RUN apt-get -y install git nodejs
7COPY . /devdocs
8RUN gem install bundler
9 2
10WORKDIR /devdocs3WORKDIR /devdocs
11 4
12RUN bundle install --system5RUN apt-get update && \
13RUN thor docs:download --all6 apt-get -y install git nodejs && \
7 gem install bundler && \
8 rm -rf /var/lib/apt/lists/*
9
10COPY Gemfile Gemfile.lock Rakefile /devdocs/
11
12RUN bundle install --system && \
13 rm -rf ~/.gem /root/.bundle/cache /usr/local/bundle/cache
14
15COPY . /devdocs
16
17RUN thor docs:download --all && \
18 thor assets:compile && \
19 rm -rf /tmp
14 20
15EXPOSE 929221EXPOSE 9292
16CMD rackup -o 0.0.0.022CMD rackup -o 0.0.0.0
17
Dockerfile-alpine+17−0
@@ -0,0 +1,17 @@
1FROM ruby:2.4.1-alpine
2
3WORKDIR /devdocs
4
5COPY . /devdocs
6
7RUN apk --update add nodejs build-base libstdc++ gzip git zlib-dev && \
8 gem install bundler && \
9 bundle install --system --without test && \
10 thor docs:download --all && \
11 thor assets:compile && \
12 apk del gzip build-base git zlib-dev && \
13 rm -rf /var/cache/apk/* /tmp ~/.gem /root/.bundle/cache \
14 /usr/local/bundle/cache /usr/lib/node_modules
15
16EXPOSE 9292
17CMD rackup -o 0.0.0.0