forked from sendgrid/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (27 loc) · 788 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM ruby:2.3.5
WORKDIR /docs
SHELL ["/bin/bash", "-lc"]
# Java
RUN apt-get update -qq && \
apt-get install -y -qq openjdk-7-jdk && \
rm -rf /var/lib/apt/lists/*
ENV JAVA_HOME /usr/lib/jvm/java-7-openjdk-amd64
# Node.js
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
COPY .nvmrc /docs
RUN nvm install $(cat .nvmrc)
COPY package.json package-lock.json /docs/
RUN npm install -g bower && \
npm install
COPY bower.json .bowerrc /docs/
RUN bower install --allow-root
COPY Gemfile Gemfile.lock /docs/
RUN bundle install -j 4
COPY . /docs
COPY _config.sample.yml _config.yml
ONBUILD VOLUME ["node_modules/"]
ONBUILD VOLUME ["gems/"]
VOLUME ["/source/"]
VOLUME ["/public/"]
EXPOSE 4000
CMD ["/bin/bash", "-lc", "bundle exec rake preview"]