-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
51 lines (36 loc) · 1.24 KB
/
Dockerfile
File metadata and controls
51 lines (36 loc) · 1.24 KB
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
51
# cp -r ~/linux-amd64_deb/ .
# docker build -t phpcades-build .
FROM ubuntu:latest
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git \
cmake \
libxml2-dev \
build-essential \
libboost-all-dev \
ca-certificates \
php-dev && \
rm -rf /var/lib/apt/lists/*
RUN update-ca-certificates
COPY linux-amd64_deb csp
RUN chmod +x ./csp/install*.sh
RUN ./csp/install.sh
RUN apt-get update && apt-get install -y --no-install-recommends \
./csp/cprocsp-rdr-gui-gtk* \
./csp/lsb-cprocsp-devel* \
./csp/cprocsp-legacy* \
./csp/cprocsp-pki-cades* && \
rm -rf /var/lib/apt/lists/*
COPY . /phpcades
WORKDIR /phpcades
RUN (SCRIPTS_DIR=./tests/scripts && \
chmod +x ${SCRIPTS_DIR}/*.sh && \
${SCRIPTS_DIR}/setup-root.sh && \
${SCRIPTS_DIR}/setup-leaf.sh && \
${SCRIPTS_DIR}/setup-crl.sh) > /dev/null 2>&1
RUN make
RUN php_exts=$(php -i | grep 'extension_dir' | cut -d' ' -f3 | xargs) && \
ln -s $(realpath build/src/libphpcades.so) $php_exts
RUN echo 'extension=libphpcades.so' >> $(php --ini | sed -n 's/^Loaded Configuration File: *//p')
# docker run phpcades-build php samples/test_extension.php