aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--client/Dockerfile9
-rw-r--r--server/Dockerfile10
2 files changed, 12 insertions, 7 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
diff --git a/server/Dockerfile b/server/Dockerfile
index 599b81f..8234da8 100644
--- a/server/Dockerfile
+++ b/server/Dockerfile
@@ -16,17 +16,19 @@ 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
- cmake --build server
CMD ["/usr/local/bin/server"]