diff options
Diffstat (limited to '')
-rw-r--r-- | client/Dockerfile | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/client/Dockerfile b/client/Dockerfile index 44b20ec..e053956 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -1,33 +1,27 @@ # To build, run from the top-level directory: # docker build -f client/Dockerfile -t egortensin/math-client . -FROM debian +FROM alpine:3.11 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 \ - build-essential \ - cmake \ - libboost-filesystem-dev \ - libboost-program-options-dev \ - libboost-test-dev \ - python3 - -ENV src_dir=/usr/src/app - +ENV src_dir=/usr/src/math-server COPY [".", "$src_dir"] -RUN "$src_dir/cmake/ci/build.py" \ - --src "$src_dir" \ - --install /usr/local \ - --clean \ - --configuration Release \ - -- -DENABLE_TESTS=ON \ - && /usr/local/bin/math-server-unit-tests --log_level=all +RUN build_deps='boost-dev cmake g++ make python3' && \ + apk add --no-cache $build_deps && \ + "$src_dir/cmake/ci/build.py" \ + --src "$src_dir" \ + --install /usr/local \ + --clean \ + --configuration Release \ + -- -D ENABLE_TESTS=ON \ + -- -D Boost_USE_STATIC_LIBS=OFF && \ + rm -rf -- "$src_dir" && \ + apk del --purge --rdepends $build_deps && \ + runtime_deps='boost-filesystem boost-program_options boost-unit_test_framework libstdc++' && \ + apk add $runtime_deps && \ + /usr/local/bin/math-server-unit-tests --log_level=all ENTRYPOINT ["/usr/local/bin/math-client"] CMD ["-c", "2 * 2"] |