diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2019-12-09 16:16:25 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2019-12-10 05:39:26 +0300 |
commit | 1896bcb183187a1a6e2e664ddb04a245cfc15946 (patch) | |
tree | a3e9a81e1d4ecafd6f2617651ab475c07161cc45 /client/Dockerfile | |
parent | Docker: install using CMake (diff) | |
download | math-server-1896bcb183187a1a6e2e664ddb04a245cfc15946.tar.gz math-server-1896bcb183187a1a6e2e664ddb04a245cfc15946.zip |
Docker: refactor Dockerfile-s
Diffstat (limited to '')
-rw-r--r-- | client/Dockerfile | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/client/Dockerfile b/client/Dockerfile index ed5762f..d5dd309 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -16,15 +16,18 @@ RUN apt-get update -yq && \ libboost-program-options-dev \ libboost-test-dev -COPY [".", "/tmp/src/"] +ENV src_dir=/tmp/src \ + build_dir=/tmp/build -WORKDIR /tmp/build +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 \ - /tmp/src && \ + "$src_dir" && \ cmake --build . --config Release --target install && \ /usr/local/bin/unit_tests --log_level=all |