diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2022-09-07 12:10:15 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2022-09-07 12:10:15 +0200 |
commit | 637647fb068c6058d6ef08b0d8888d567f1b82fb (patch) | |
tree | 3130505025a65725d34bee8f30dfbdf92416a8e0 /Dockerfile | |
parent | net: removed unused API (diff) | |
download | cimple-637647fb068c6058d6ef08b0d8888d567f1b82fb.tar.gz cimple-637647fb068c6058d6ef08b0d8888d567f1b82fb.zip |
add Makefile
Diffstat (limited to '')
-rw-r--r-- | Dockerfile | 22 |
1 files changed, 10 insertions, 12 deletions
@@ -4,25 +4,23 @@ ARG install_dir="/app/install" FROM base AS builder -RUN apk add --no-cache bsd-compat-headers build-base clang cmake libgit2-dev +RUN apk add --no-cache bash bsd-compat-headers build-base clang cmake libgit2-dev -ARG default_host=127.0.0.1 +ARG C_COMPILER=clang +ARG BUILD_TYPE=Release +ARG DEFAULT_HOST=127.0.0.1 ARG src_dir="/app/src" -ARG build_dir="/app/build" ARG install_dir COPY [".", "$src_dir"] -RUN mkdir -- "$build_dir" && \ - cd -- "$build_dir" && \ - cmake \ - -D "DEFAULT_HOST=$default_host" \ - -D CMAKE_C_COMPILER=clang \ - -D CMAKE_BUILD_TYPE=Release \ - -D "CMAKE_INSTALL_PREFIX=$install_dir" \ - "$src_dir" && \ - make -j install +RUN cd -- "$src_dir" && \ + make install \ + "C_COMPILER=$C_COMPILER" \ + "BUILD_TYPE=$BUILD_TYPE" \ + "DEFAULT_HOST=$DEFAULT_HOST" \ + "INSTALL_PREFIX=$install_dir" FROM base |