aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Dockerfile
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2022-09-07 12:10:15 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2022-09-07 12:10:15 +0200
commit637647fb068c6058d6ef08b0d8888d567f1b82fb (patch)
tree3130505025a65725d34bee8f30dfbdf92416a8e0 /Dockerfile
parentnet: removed unused API (diff)
downloadcimple-637647fb068c6058d6ef08b0d8888d567f1b82fb.tar.gz
cimple-637647fb068c6058d6ef08b0d8888d567f1b82fb.zip
add Makefile
Diffstat (limited to '')
-rw-r--r--Dockerfile22
1 files changed, 10 insertions, 12 deletions
diff --git a/Dockerfile b/Dockerfile
index 3a5531d..22c9ff7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -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