-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
41 lines (35 loc) · 932 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
37
38
39
40
41
FROM buildpack-deps:zesty
MAINTAINER Christopher Locke <[email protected]>
# Get required packages
RUN apt-get update && apt-get install -y \
vim \
git \
build-essential \
wget \
cmake \
libboost-all-dev \
libgtest-dev \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Install gtest for importing by CMake
RUN install -d gtest_build && \
cd gtest_build && \
cmake /usr/src/gtest/ && \
make && \
cp *.a /usr/lib && \
cd ..
ENV ROULETTE_DIR "/opt/roulette"
RUN mkdir $ROULETTE_DIR
WORKDIR $ROULETTE_DIR
# Add current folder, and remove all extraneous working files
ADD . $ROULETTE_DIR
RUN git reset --hard HEAD
RUN git clean -fd
# Build the main exectable and tests
RUN mkdir build && \
cd build && \
cmake .. && \
make -j8 main tests && \
cd ..
RUN ln -sf $ROULETTE_DIR/build/main /usr/local/bin/roulette