From ab405f671e0cd4dfe9492bd6ff39b182dd936a4d Mon Sep 17 00:00:00 2001 From: Kevin Papst Date: Wed, 5 Jun 2019 13:56:31 +0200 Subject: [PATCH] updated dockerfile (#840) --- Dockerfile | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index ef79b7ae..6471b7ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,17 +2,18 @@ # # For the full copyright and license information, please view the LICENSE # file that was distributed with this source code. - -FROM php:7.2.9-apache-stretch +FROM php:7.2.9-apache-stretch AS tmp_kimai2_base RUN apt update && \ - apt install -y \ + apt install -y --allow-unauthenticated \ git \ + haveged \ libicu-dev \ libjpeg-dev \ libldap2-dev \ libldb-dev \ libpng-dev \ + mysql-client \ unzip \ wget \ zip \ @@ -32,18 +33,22 @@ RUN apt update && \ zip && \ apt remove -y wget && \ apt -y autoremove && \ - apt clean && \ - git clone https://github.com/kevinpapst/kimai2.git /opt/kimai && \ + apt clean + +FROM tmp_kimai2_base + +RUN git clone https://github.com/kevinpapst/kimai2.git /opt/kimai && \ sed "s/prod/dev/g" /opt/kimai/.env.dist > /opt/kimai/.env && \ composer install --working-dir=/opt/kimai --dev --optimize-autoloader && \ /opt/kimai/bin/console doctrine:database:create && \ /opt/kimai/bin/console doctrine:schema:create && \ /opt/kimai/bin/console doctrine:migrations:version --add --all && \ /opt/kimai/bin/console cache:warmup && \ - chown -R www-data:www-data /opt/kimai/var + chown -R www-data:www-data /opt/kimai/var && \ + chown www-data:www-data /opt/kimai/vendor/mpdf/mpdf/tmp WORKDIR /opt/kimai EXPOSE 8001 USER www-data -CMD /opt/kimai/bin/console server:run 0.0.0.0:8001 +CMD /opt/kimai/bin/console server:run 0.0.0.0:8001 \ No newline at end of file