Skip to content

Commit

Permalink
Optimize builder
Browse files Browse the repository at this point in the history
  • Loading branch information
maxm86545 committed Feb 27, 2023
1 parent 4840f0d commit 0c5ae47
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
11 changes: 7 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,16 @@ endif ()

CPMAddPackage(
NAME libuv
GITHUB_REPOSITORY libuv/libuv
VERSION 1.44.2
URL https://github.com/libuv/libuv/tarball/v1.44.2
URL_HASH MD5=3e22e24d53aab67252907dfa004a6b53
OPTIONS
"BUILD_TESTING OFF"
"BUILD_BENCHMARKS OFF"
"LIBUV_BUILD_SHARED ${LIBUV_BUILD_SHARED}"
"CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -fPIC"
"CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -fPIC"
GIT_TAG v1.44.2

)

set(LIBUV_ROOT_DIR ${libuv_BINARY_DIR})
Expand All @@ -71,7 +73,9 @@ endif ()

CPMAddPackage(
NAME libscylladb
GITHUB_REPOSITORY scylladb/cpp-driver
VERSION 2.16.2
URL https://github.com/scylladb/cpp-driver/tarball/2.16.2b
URL_HASH MD5=67e6c74cdd6c9692b2745bfc28dccdaa
OPTIONS
"CASS_CPP_STANDARD 17"
"CASS_BUILD_STATIC ${CASS_BUILD_STATIC}"
Expand All @@ -84,7 +88,6 @@ CPMAddPackage(
"CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -fPIC"
"LIBUV_LIBRARY ${LIBUV_LIBRARY}"
"LIBUV_INCLUDE_DIR ${libuv_SOURCE_DIR}/include"
GIT_TAG 2.16.2b
)


Expand Down
22 changes: 10 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,26 @@ COPY . /ext-scylladb

WORKDIR /ext-scylladb

RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php composer-setup.php \
&& php -r "unlink('composer-setup.php');" \
&& mv composer.phar /bin/composer \
&& docker-php-source extract \
&& apt update -y \
&& apt install \
RUN apt update -y \
&& apt install -y \
python3 \
python3-pip \
unzip \
mlocate \
build-essential \
ninja-build \
git \
libssl-dev \
libgmp-dev \
zlib1g-dev \
openssl \
libpcre3-dev -y \
libpcre3-dev \
&& pip3 install cmake \
&& install-php-extensions intl zip pcntl gmp \
&& docker-php-source delete \
&& install-php-extensions \
intl \
zip \
pcntl \
gmp \
@composer \
&& apt-get clean \

FROM base as build
Expand All @@ -50,4 +48,4 @@ RUN mkdir -p build/Release \
&& ninja \
&& ninja install \
&& cp cassandra.so ${PHP_EXT_DIR}/cassandra.so \
&& cp ../../cassandra.ini ${PHP_CONF_DIR}/cassandra.ini
&& cp ../../cassandra.ini ${PHP_CONF_DIR}/cassandra.ini

0 comments on commit 0c5ae47

Please sign in to comment.