2023-07-21 15:51:39 +02:00
|
|
|
FROM php:8.2-apache
|
2017-09-07 17:43:00 +02:00
|
|
|
|
2023-09-22 09:03:29 +02:00
|
|
|
ENV NEXTCLOUD_VERSION 27.1.1
|
2017-09-07 17:43:00 +02:00
|
|
|
|
|
|
|
RUN \
|
|
|
|
apt-get update && \
|
2023-07-21 23:14:23 +02:00
|
|
|
apt-get install -y eatmydata && \
|
|
|
|
eatmydata apt-get install -y --no-install-recommends \
|
2017-09-07 17:43:00 +02:00
|
|
|
supervisor \
|
|
|
|
cron \
|
|
|
|
sudo \
|
2019-09-30 22:46:52 +02:00
|
|
|
ffmpeg \
|
2017-09-07 17:43:00 +02:00
|
|
|
libldap2-dev \
|
|
|
|
libxml2-dev \
|
|
|
|
libpng-dev \
|
|
|
|
libcurl4-openssl-dev \
|
|
|
|
libmagickwand-dev \
|
|
|
|
libbz2-dev \
|
|
|
|
icu-devtools \
|
|
|
|
libicu-dev \
|
2019-09-30 22:46:52 +02:00
|
|
|
libzip-dev \
|
2017-09-07 17:43:00 +02:00
|
|
|
libmcrypt-dev \
|
|
|
|
libfreetype6-dev \
|
|
|
|
libssl-dev \
|
|
|
|
libjpeg-dev \
|
2019-10-22 19:51:59 +02:00
|
|
|
libgmp-dev \
|
2017-09-07 17:43:00 +02:00
|
|
|
curl \
|
2023-07-22 13:53:54 +02:00
|
|
|
libpq-dev \
|
2017-09-07 17:43:00 +02:00
|
|
|
cron && \
|
|
|
|
apt-get clean && \
|
|
|
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
|
|
|
#Dirty hack to circumvent bug in phpize which is open since May 2016
|
|
|
|
#Basically the "missing" config.m4 is named "config0.m4"
|
|
|
|
#This tries to install zlib and if it doesn't work then rename the file and try again"
|
|
|
|
RUN \
|
|
|
|
docker-php-ext-install zlib || \
|
|
|
|
( mv /usr/src/php/ext/zlib/config0.m4 /usr/src/php/ext/zlib/config.m4 && \
|
|
|
|
docker-php-ext-install zlib )
|
|
|
|
|
|
|
|
# See above
|
|
|
|
RUN \
|
|
|
|
docker-php-ext-install openssl || \
|
|
|
|
( mv /usr/src/php/ext/openssl/config0.m4 /usr/src/php/ext/openssl/config.m4 && \
|
|
|
|
docker-php-ext-install openssl )
|
|
|
|
|
|
|
|
RUN \
|
|
|
|
docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu && \
|
2020-11-20 10:59:13 +01:00
|
|
|
docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ && \
|
2017-09-07 17:43:00 +02:00
|
|
|
docker-php-ext-install \
|
|
|
|
ldap \
|
|
|
|
ctype \
|
|
|
|
dom \
|
|
|
|
gd \
|
2019-10-22 19:51:59 +02:00
|
|
|
gmp \
|
2017-09-07 17:43:00 +02:00
|
|
|
xmlwriter \
|
|
|
|
zip \
|
|
|
|
pdo_mysql \
|
|
|
|
curl \
|
|
|
|
bz2 \
|
|
|
|
intl \
|
2020-08-27 22:50:55 +02:00
|
|
|
bcmath \
|
2023-06-01 15:53:47 +02:00
|
|
|
sysvsem \
|
|
|
|
pcntl \
|
2023-07-22 13:53:54 +02:00
|
|
|
opcache \
|
|
|
|
pdo_pgsql \
|
|
|
|
pdo && \
|
2017-09-07 17:43:00 +02:00
|
|
|
CFLAGS="-I/usr/src/php" docker-php-ext-install xmlreader
|
|
|
|
|
|
|
|
RUN \
|
2021-02-23 17:20:37 +01:00
|
|
|
pecl install -o -f apcu && \
|
2017-09-07 17:43:00 +02:00
|
|
|
rm -rf /tmp/pear && \
|
2021-02-23 17:20:37 +01:00
|
|
|
docker-php-ext-enable apcu
|
|
|
|
|
|
|
|
# compile imagick from master branch as there isn't any release for php8 yet.
|
|
|
|
RUN \
|
2022-10-28 08:34:39 +02:00
|
|
|
pecl install imagick && \
|
2021-02-23 17:20:37 +01:00
|
|
|
docker-php-ext-enable imagick
|
2017-09-07 17:43:00 +02:00
|
|
|
|
|
|
|
# Activate user-defined .htaccess
|
|
|
|
RUN \
|
|
|
|
a2enmod rewrite env
|
|
|
|
|
|
|
|
# Add extra configuration to php.ini
|
|
|
|
ADD nextcloud_php.ini /usr/local/etc/php/conf.d/nextcloud_php.ini
|
|
|
|
|
|
|
|
RUN \
|
|
|
|
curl -o /tmp/nextcloud.tar.bz2 https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2 && \
|
|
|
|
tar xvjf /tmp/nextcloud.tar.bz2 -C /tmp && \
|
|
|
|
rm -rf /var/www/html && \
|
|
|
|
mv /tmp/nextcloud /var/www/html && \
|
|
|
|
chown -R www-data:www-data /var/www/html && \
|
|
|
|
rm /tmp/nextcloud.tar.bz2
|
|
|
|
|
|
|
|
# Add supervisor and cron config
|
2017-09-10 13:13:34 +02:00
|
|
|
ADD crontab /opt/crontab
|
2017-09-07 17:43:00 +02:00
|
|
|
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
|
|
|
ADD update-htaccess.sh /update-htaccess.sh
|
|
|
|
|
2017-09-10 13:13:34 +02:00
|
|
|
RUN crontab /opt/crontab && chmod +x /update-htaccess.sh
|
2021-11-13 11:51:31 +01:00
|
|
|
RUN mkdir /nc_data_ext && chown www-data: /nc_data_ext
|
2017-09-07 17:43:00 +02:00
|
|
|
|
2021-11-13 11:51:31 +01:00
|
|
|
VOLUME ["/var/www/html/config","/nc_data_ext"]
|
2017-09-07 17:43:00 +02:00
|
|
|
|
|
|
|
ENTRYPOINT ["supervisord"]
|