-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.dev
43 lines (37 loc) · 1.03 KB
/
Dockerfile.dev
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
37
38
39
40
41
42
43
FROM ubuntu:18.04
MAINTAINER John Murray <[email protected]>
# Define the port the dev-server is going to run on
EXPOSE 1234
# Install all of our dependencies. This includes deps for:
# - Running the site's web-server
# - Compiling the site-generator
# - Auxillary site-building tools (node/npm)
RUN apt-get update
RUN apt-get install -y \
clang-6.0 \
build-essential \
libboost-all-dev \
libyaml-cpp-dev \
libctemplate-dev \
nodejs \
npm \
ruby \
ruby-dev
RUN npm install -g less
RUN gem install bundler -v 1.15.2
# Setup web-server dependencies
COPY Gemfile .
COPY Gemfile.lock .
RUN bundle install
# Compile Site Generator
RUN mkdir -p gen
COPY gen gen/
COPY Makefile .
RUN make clean && make compile
# copy site, generate files, start the web-server
# ---
# This is the bit that is almost _certainly_ not going to
# get cached, so anything that is more static or less likely
# to invalidate the cache should happen before these two lines
COPY . .
CMD make clean && make generate && make serve