aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/server
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2019-12-10 11:30:27 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2019-12-10 16:44:54 +0300
commitcf15b237108360ee92f35898e35fa5a52cfc889a (patch)
tree9c95f527c25b9c14d14018e156a9fad6b286ded3 /server
parentREADME: update (diff)
downloadmath-server-cf15b237108360ee92f35898e35fa5a52cfc889a.tar.gz
math-server-cf15b237108360ee92f35898e35fa5a52cfc889a.zip
AppVeyor/Travis: switch to cmake/build
Diffstat (limited to '')
-rw-r--r--server/Dockerfile26
1 files changed, 12 insertions, 14 deletions
diff --git a/server/Dockerfile b/server/Dockerfile
index 8234da8..96bb51c 100644
--- a/server/Dockerfile
+++ b/server/Dockerfile
@@ -8,27 +8,25 @@ LABEL maintainer="Egor Tensin <Egor.Tensin@gmail.com>"
# Don't prompt:
ENV DEBIAN_FRONTEND=noninteractive
-RUN apt-get update -yq && \
- apt-get install -yq --no-install-recommends \
+RUN apt-get update -yq \
+ && apt-get install -yq --no-install-recommends \
build-essential \
cmake \
libboost-filesystem-dev \
libboost-program-options-dev \
- libboost-test-dev
+ libboost-test-dev \
+ python3
-ENV src_dir=/tmp/src \
- build_dir=/tmp/build
+ENV src_dir=/usr/src/app
COPY [".", "$src_dir"]
-WORKDIR $build_dir
-
-RUN cmake -G "Unix Makefiles" \
- -D CMAKE_BUILD_TYPE=Release \
- -D CMAKE_INSTALL_PREFIX=/usr/local \
- -D ENABLE_TESTS=ON \
- "$src_dir" && \
- cmake --build . --config Release --target install && \
- /usr/local/bin/unit_tests --log_level=all
+RUN "$src_dir/cmake/build/build.py" \
+ --src "$src_dir" \
+ --install /usr/local \
+ --clean \
+ --configuration Release \
+ -- -DENABLE_TESTS=ON \
+ && /usr/local/bin/unit_tests --log_level=all
CMD ["/usr/local/bin/server"]