converter/Dockerfile

51 lines
1.2 KiB
Docker

FROM ubuntu:21.10
ENV php_version=7.4
COPY . /tmp/
RUN apt-get update -y \
&& apt-get install gnupg gnupg1 gnupg2 software-properties-common -y \
&& apt-add-repository ppa:ondrej/php \
&& apt-get update -y \
&& apt-get install -y \
python \
wget \
apache2 \
cron \
supervisor \
php${php_version} \
php${php_version}-curl \
php${php_version}-zip \
libxinerama1 \
libdbus-1-3 \
libgio-cil \
libcairo-5c0 \
libcups2 \
libsm6 \
libx11-xcb1 \
default-jre \
libreoffice \
unoconv \
&& apt-get purge gnupg gnupg1 gnupg2 software-properties-common -y \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /var/www/html/* \
&& a2enmod rewrite \
&& cp -r /tmp/rootfs/* / \
&& rm -rf /tmp/rootfs \
&& cp -R /tmp/* /var/www/html \
&& cp -R /tmp/.[^.]* /var/www/html \
&& cat /var/www/html/cron_tmp >> /etc/crontab \
&& rm -f /var/www/html/cron_tmp \
&& mkdir /var/www/html/files \
&& chmod a+rwx /var/www/html/files \
&& rm -rf /tmp/* \
&& rm -rf /var/www/html/Dockerfile \
&& rm -rf /var/www/html/.dockerignore \
&& echo Complete
EXPOSE 80
CMD ["/usr/bin/supervisord"]