forked from cgrima/docker_i-librarian
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
66 lines (55 loc) · 1.55 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
FROM php:7.4-apache
# Variables
ENV COMPOSER_ALLOW_SUPERUSER=1
ENV ILIB_VERSION 5.10.4
ENV UID 33
ENV GID 33
EXPOSE 80
WORKDIR /app
# Fix openjdk-11-jre configuration for Libreoffice installation
RUN mkdir -p /usr/share/man/man1
# Install Dependencies
RUN apt-get update -qq && \
apt-get install -qy \
ghostscript \
git \
gnupg \
libfreetype6-dev \
libjpeg62-turbo-dev \
libicu-dev \
libldap2-dev \
libpng-dev libxpm-dev \
libreoffice \
libwebp-dev \
libzip-dev \
poppler-utils \
tesseract-ocr \
unzip \
wget \
zip && \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN docker-php-ext-configure gd \
--with-freetype=/usr/include/ \
--with-jpeg=/usr/include/
RUN docker-php-ext-install \
gd \
intl \
ldap \
sysvsem \
sysvshm \
zip
# PHP Extensions
RUN docker-php-ext-install -j$(nproc) opcache pdo_mysql
COPY conf/php.ini /usr/local/etc/php/conf.d/app.ini
# Install I-Librarian
RUN wget https://github.com/mkucej/i-librarian-free/archive/${ILIB_VERSION}.tar.gz \
&& tar -xvf ${ILIB_VERSION}.tar.gz --strip-components 1 -C /app \
&& rm ${ILIB_VERSION}.tar.gz
RUN chown -R www-data:www-data /app/data
# Apache
COPY conf/vhost.conf /etc/apache2/sites-available/000-default.conf
COPY conf/apache.conf /etc/apache2/conf-available/z-app.conf
RUN a2enmod rewrite remoteip && \
a2enconf z-app
CMD ["/usr/sbin/apache2ctl","-D","FOREGROUND"]