2020-01-17 13:44:07 +00:00
|
|
|
FROM php:7.4-apache
|
2024-06-24 06:44:21 +00:00
|
|
|
LABEL maintainer="Namhyeon Go<gnh1201@gmail.com>, Niels Lippke<nlippke@gmx.de>"
|
|
|
|
ENV VER 6.0.28
|
2023-04-19 19:22:46 +00:00
|
|
|
ENV PAPERLESS_VER 1.1.0
|
2021-09-02 11:08:56 +00:00
|
|
|
ENV SEEDDMS_BASE=/var/www/seeddms \
|
2024-06-24 06:44:21 +00:00
|
|
|
SEEDDMS_HOME=/var/www/seeddms/seeddms-${VER}
|
2021-09-02 11:08:56 +00:00
|
|
|
ENV PUBLIC_CERT=${SEEDDMS_BASE}/conf/cacert.pem \
|
|
|
|
PUBLIC_CERT_SUBJ=/CN=localhost \
|
|
|
|
PRIVATE_KEY=${SEEDDMS_BASE}/conf/cakey.pem \
|
|
|
|
FORCE_SSL=0
|
2020-01-17 13:44:07 +00:00
|
|
|
|
|
|
|
# Update and install necessary packages
|
2024-06-24 06:44:21 +00:00
|
|
|
RUN apt-get update && apt-get install --no-install-recommends git gnumeric libpng-dev catdoc poppler-utils a2ps html2text \
|
2021-12-28 14:39:29 +00:00
|
|
|
id3 docx2txt tesseract-ocr tesseract-ocr-deu ocrmypdf imagemagick vim parallel dos2unix cron rsync libzip-dev \
|
2023-04-13 18:52:30 +00:00
|
|
|
libldb-dev libldap2-dev libxslt1-dev \
|
2021-12-28 14:39:29 +00:00
|
|
|
libmagickwand-dev -y && rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN printf "\n" | pecl install imagick
|
|
|
|
RUN docker-php-ext-enable imagick
|
2023-04-13 18:52:30 +00:00
|
|
|
RUN docker-php-ext-install gd mysqli pdo pdo_mysql zip ldap xsl intl && \
|
2020-01-17 13:44:07 +00:00
|
|
|
pear channel-update pear.php.net && pear install Log
|
|
|
|
|
|
|
|
# Get seeddms
|
|
|
|
RUN curl -fsSL https://downloads.sourceforge.net/project/seeddms/seeddms-${VER}/seeddms-quickstart-${VER}.tar.gz | tar -xzC /var/www
|
2024-06-24 06:44:21 +00:00
|
|
|
RUN mv /var/www/seeddms60x $SEEDDMS_BASE
|
|
|
|
|
|
|
|
WORKDIR $SEEDDMS_BASE
|
|
|
|
RUN mkdir backup && mkdir -p import/admin && mkdir ext && touch conf/ENABLE_INSTALL_TOOL && \
|
|
|
|
git clone https://codeberg.org/SeedDMS/paperless www/ext/paperless
|
2020-01-17 13:44:07 +00:00
|
|
|
|
|
|
|
# Copy settings-files
|
|
|
|
COPY sources/php.ini /usr/local/etc/php/
|
|
|
|
COPY sources/000-default.conf /etc/apache2/sites-available/
|
2024-06-24 06:44:21 +00:00
|
|
|
COPY sources/settings.xml $SEEDDMS_BASE/conf/settings.xml
|
2020-01-17 13:44:07 +00:00
|
|
|
COPY sources/seeddms-entrypoint /usr/local/bin
|
2020-01-19 15:26:25 +00:00
|
|
|
COPY sources/*.sh /usr/local/bin/
|
2021-01-01 16:26:26 +00:00
|
|
|
COPY sources/policy.xml /etc/ImageMagick-6/policy.xml
|
2020-01-17 13:44:07 +00:00
|
|
|
|
2024-06-24 06:44:21 +00:00
|
|
|
RUN chown -R www-data:www-data ./ && \
|
2020-01-19 15:26:25 +00:00
|
|
|
dos2unix /usr/local/bin/*.sh && chmod a+rx /usr/local/bin/*.sh && \
|
2020-01-17 13:44:07 +00:00
|
|
|
dos2unix /usr/local/bin/seeddms-entrypoint && chmod a+rx /usr/local/bin/seeddms-entrypoint && \
|
2020-01-19 15:26:25 +00:00
|
|
|
a2enmod rewrite && \
|
|
|
|
echo "export SEEDDMS_BASE=$SEEDDMS_BASE" >> /usr/local/bin/seeddms-settings.sh && \
|
2021-09-02 11:08:56 +00:00
|
|
|
echo "export SEEDDMS_HOME=$SEEDDMS_HOME" >> /usr/local/bin/seeddms-settings.sh && \
|
|
|
|
sed -ri -e 's!/var/www/html!${SEEDDMS_BASE}/www!g' /etc/apache2/sites-available/*.conf && \
|
|
|
|
sed -ri -e 's!/var/www/!${SEEDDMS_BASE}/www!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
|
2020-01-17 13:44:07 +00:00
|
|
|
|
2021-09-02 11:08:56 +00:00
|
|
|
WORKDIR /etc/apache2/sites-enabled
|
|
|
|
RUN ln -s ../sites-available/default-ssl.conf default-ssl.conf
|
|
|
|
WORKDIR /etc/apache2/mods-enabled
|
|
|
|
RUN ln -s ../mods-available/ssl.conf ssl.conf && \
|
|
|
|
ln -s ../mods-available/ssl.load ssl.load && \
|
|
|
|
ln -s ../mods-available/socache_shmcb.load socache_shmcb.load
|
|
|
|
|
2024-06-24 06:44:21 +00:00
|
|
|
VOLUME ["/var/www/seeddms/data", "/var/www/seeddms/backup"]
|
2020-01-17 13:44:07 +00:00
|
|
|
|
2024-06-24 06:44:21 +00:00
|
|
|
ENTRYPOINT ["/usr/local/bin/seeddms-entrypoint"]
|
2020-02-17 20:03:13 +00:00
|
|
|
CMD ["apache2-foreground"]
|