forked from he4rt/scylladb-php-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
50 lines (38 loc) · 1.06 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM ubuntu:22.04 as base
ARG PHP_VERSION=8.2.6
ARG PHP_ZTS="no"
ENV PATH="$PATH:$HOME/.local/bin:$HOME/php/bin"
RUN apt-get update -y \
&& apt-get upgrade -y \
&& apt-get install -y \
autoconf \
pkg-config \
sudo \
wget \
git \
gcc \
g++ \
gdb \
python3 \
python3-pip \
unzip \
mlocate \
build-essential \
ninja-build \
libasan8 \
libubsan1 \
&& pip3 install cmake cqlsh \
&& apt-get clean
COPY ./scripts /tmp/scripts
WORKDIR /tmp
RUN ./scripts/compile-php.sh -a -k -v $PHP_VERSION -o $HOME -s -d no -zts $PHP_ZTS \
&& $HOME/php/bin/php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& $HOME/php/bin/php composer-setup.php --install-dir=/bin --filename=composer \
&& $HOME/php/bin/php -r "unlink('composer-setup.php');" \
&& rm -rf /tmp/scripts
ENTRYPOINT ["bash"]
FROM base as build
COPY . /ext-scylladb
WORKDIR /ext-scylladb
RUN ./scripts/compile-extension.sh
ENTRYPOINT ["bash"]