-
Notifications
You must be signed in to change notification settings - Fork 28
/
Dockerfile
36 lines (29 loc) · 998 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.4.2
MAINTAINER Yevgeniy Brikman <[email protected]>
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get install -y curl ca-certificates jq && \
curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
apt-get install -y nodejs && \
rm -rf /var/lib/apt/lists/*
# Install grunt
RUN npm install -g grunt-cli
# Copy the package.json file into the image and run npm install in a
# way that will be cached. See: http://bitjudo.com/blog/2014/03/13/building-efficient-dockerfiles-node-dot-js/
ADD package.json /tmp/package.json
RUN cd /tmp && npm install
RUN mkdir -p /src && cp -a /tmp/node_modules /src/
# Copy the Gemfile and Gemfile.lock into the image and run bundle install in a
# way that will be cached
WORKDIR /tmp
ADD Gemfile Gemfile
ADD Gemfile.lock Gemfile.lock
RUN bundle install
# Copy source
RUN mkdir -p /src
VOLUME ["/src"]
WORKDIR /src
COPY . /src
# Jekyll runs on port 4000 by default
EXPOSE 4000
# Run jekyll serve
CMD ["./npm-start.sh"]