aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/server/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--server/Dockerfile29
1 files changed, 29 insertions, 0 deletions
diff --git a/server/Dockerfile b/server/Dockerfile
new file mode 100644
index 0000000..8b53b9e
--- /dev/null
+++ b/server/Dockerfile
@@ -0,0 +1,29 @@
+# To build, run from the top-level directory:
+# docker build -f server/Dockerfile -t egortensin/math-server .
+
+FROM debian
+
+LABEL maintainer="Egor Tensin <Egor.Tensin@gmail.com>"
+
+# Don't prompt:
+ENV DEBIAN_FRONTEND=noninteractive
+
+RUN apt-get update -yq && apt-get dist-upgrade -yq
+
+RUN apt-get install -yq build-essential cmake libboost-filesystem-dev libboost-program-options-dev libboost-test-dev
+
+COPY [".", "/tmp/src/"]
+
+WORKDIR /tmp/build
+
+RUN cmake -G "Unix Makefiles" \
+ -D CMAKE_BUILD_TYPE=Release \
+ -D ENABLE_TESTS=ON \
+ -D USE_STATIC_RUNTIME=OFF \
+ -D CMAKE_CXX_STANDARD_LIBRARIES="-lpthread" \
+ /tmp/src && \
+ cmake --build test && \
+ ./test/unit_tests/unit_tests --log_level=all && \
+ cmake --build server
+
+CMD ["./server/server"]