Project

Profile

Help

Download (2.27 KB) Statistics
| Branch: | Tag: | Revision:

he / latest9.8 / hec / Dockerfile @ 5843c8b6

1 109c3add O'Neil Delpratt
2
FROM ubuntu:latest
3 590d0129 O'Neil Delpratt
4
MAINTAINER O'Neil Delpratt <oneil@saxonica.com>
5
6 109c3add O'Neil Delpratt
RUN apt-get update && apt-get -y upgrade && DEBIAN_FRONTEND=noninteractive apt-get -y install wget unzip apache2 php7.2 php7.2-dev libapache2-mod-php7.2
7 590d0129 O'Neil Delpratt
8 109c3add O'Neil Delpratt
WORKDIR /
9
RUN a2enmod php7.2
10
RUN a2enmod rewrite
11 590d0129 O'Neil Delpratt
12 f773e3b8 O'Neil Delpratt
# remove after testing
13
ADD web /var/www/html
14
15 b0526f9c O'Neil Delpratt
RUN wget http://www.saxonica.com/saxon-c/libsaxon-HEC-setup64-v1.1.2.zip && unzip libsaxon-HEC-setup64-v1.1.2.zip
16
RUN yes "" | ./libsaxon-HEC-setup64-v1.1.2
17
RUN ln -s /Saxonica/Saxon-HEC1.1.2/samples/php /var/www/html/
18 590d0129 O'Neil Delpratt
RUN ln -s /usr/lib/ /usr/lib64
19 b0526f9c O'Neil Delpratt
RUN ln -s /Saxonica/Saxon-HEC1.1.2/libsaxonhec64.so /usr/lib/libsaxonhec64.so
20
RUN ln -s /Saxonica/Saxon-HEC1.1.2/rt/ /usr/lib/rt
21 590d0129 O'Neil Delpratt
RUN export LD_LIBRARY_PATH=/usr/lib/rt/lib/amd64:$LD_LIBRARY_PATH
22
RUN ldconfig
23
24 b0526f9c O'Neil Delpratt
WORKDIR /Saxonica/Saxon-HEC1.1.2/Saxon.C.API/
25 109c3add O'Neil Delpratt
26
RUN wget https://dev.saxonica.com/repos/archive/opensource/latest9.8/hec/Saxon.C.API/jni/jni.h
27 b0526f9c O'Neil Delpratt
RUN wget https://dev.saxonica.com/repos/archive/opensource/latest9.8/hec/Saxon.C.API/jni/unix/jni_md.h
28 109c3add O'Neil Delpratt
29 a63f52b1 O'Neil Delpratt
RUN phpize && ./configure --enable-saxon CPPFLAGS="-Ijni" && make && make install
30 109c3add O'Neil Delpratt
RUN echo extension=saxon.so >> /etc/php/7.2/apache2/conf.d/saxon.ini
31
RUN echo extension=saxon.so >> /etc/php/7.2/mods-available/saxon.ini
32
RUN phpenmod saxon
33 590d0129 O'Neil Delpratt
RUN php -m | grep saxon -i
34 109c3add O'Neil Delpratt
RUN echo export LD_LIBRARY_PATH=/usr/lib/rt/lib/amd64:$LD_LIBRARY_PATH >> /etc/apache2/envvars 
35
# CMD ["apachectl", "-DFOREGROUND"]
36
37 fc633dd9 O'Neil Delpratt
RUN apt-get clean \
38
    && apt-get remove -y unzip wget \
39
    && apt-get autoremove -y \
40
    && rm -rf /var/lib/apt/lists/
41
42 109c3add O'Neil Delpratt
RUN sed -i "s/short_open_tag = Off/short_open_tag = On/" /etc/php/7.2/apache2/php.ini
43
RUN sed -i "s/error_reporting = .*$/error_reporting = E_ERROR | E_WARNING | E_PARSE/" /etc/php/7.2/apache2/php.ini
44
45
# Manually set up the apache environment variables
46
ENV APACHE_RUN_USER www-data
47
ENV APACHE_RUN_GROUP www-data
48
ENV APACHE_LOG_DIR /var/log/apache2
49
ENV APACHE_LOCK_DIR /var/lock/apache2
50
ENV APACHE_PID_FILE /var/run/apache2.pid
51
52
# Expose apache.
53
EXPOSE 80
54
55
# Copy this repo into place.
56
#ADD samples/php /var/www/html
57
58
# Update the default apache site with the config we created.
59
ADD apache-config.conf /etc/apache2/sites-enabled/000-default.conf
60
61
# By default start up apache in the foreground, override with /bin/bash for interative.
62
CMD /usr/sbin/apache2ctl -D FOREGROUND