aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/client/Dockerfile
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2019-11-30 03:58:18 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2019-12-01 05:23:11 +0300
commit21c137302332f969eae34b407ad298b03ff16497 (patch)
tree1bd4937973c1db62c351b74d8c7c6c01ccd5cd4f /client/Dockerfile
parentinitial commit (diff)
downloadmath-server-21c137302332f969eae34b407ad298b03ff16497.tar.gz
math-server-21c137302332f969eae34b407ad298b03ff16497.zip
add Docker files
Diffstat (limited to 'client/Dockerfile')
-rw-r--r--client/Dockerfile30
1 files changed, 30 insertions, 0 deletions
diff --git a/client/Dockerfile b/client/Dockerfile
new file mode 100644
index 0000000..b60e96b
--- /dev/null
+++ b/client/Dockerfile
@@ -0,0 +1,30 @@
+# To build, run from the top-level directory:
+# docker build -f client/Dockerfile -t egortensin/math-client .
+
+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=RelWithDebInfo \
+ -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 client
+
+ENTRYPOINT ["./client/client"]
+CMD ["-c", "2 * 2"]