From 03457b2122987f0269c964821ba24eb011748612 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 10:32:18 +0200 Subject: [PATCH] Nog een test met tags --- docker/backend.dockerfile | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/docker/backend.dockerfile b/docker/backend.dockerfile index d1eb1f1..598e2a5 100644 --- a/docker/backend.dockerfile +++ b/docker/backend.dockerfile @@ -7,16 +7,24 @@ WORKDIR /var/www # upgrades! RUN apt-get update RUN apt-get -y dist-upgrade -RUN apt-get install -y zip +RUN apt-get -qq install -y zip -RUN apt-get install -y sudo nano -RUN apt-get install -y mariadb-client +RUN apt-get -qq install -y sudo nano +RUN apt-get -qq install -y mariadb-client + +RUN apt-get -qq install -y libonig-dev +RUN apt-get -qq install -y ca-certificates curl gnupg + +# required for sending mail. +RUN apt-get -qq install -y sendmail +RUN apt-get -qq install -y libzip-dev +RUN apt-get -qq install -y zlib1g-dev # install mysql RUN docker-php-ext-install pdo_mysql mysqli # install additional PHP extensions -RUN apt-get install -y libmcrypt-dev \ +RUN apt-get -qq install -y libmcrypt-dev \ libmagickwand-dev --no-install-recommends \ && pecl install mcrypt-1.0.7 \ && docker-php-ext-install pdo_mysql \ @@ -24,6 +32,11 @@ RUN apt-get install -y libmcrypt-dev \ RUN apt-get clean -y +# email configuration +RUN echo "sendmail_path='/usr/sbin/sendmail -t -i --smtp-addr=\"mail.docker:1025\"'" >> /usr/local/etc/php/conf.d/sendmail.ini +RUN sed -i '/#!\/bin\/sh/aservice sendmail restart' /usr/local/bin/docker-php-entrypoint +RUN sed -i '/#!\/bin\/sh/aecho "$(hostname -i)\t$(hostname) $(hostname).localhost" >> /etc/hosts' /usr/local/bin/docker-php-entrypoint + # set corrent TimeZone ENV TZ=Europe/Amsterdam RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone @@ -31,13 +44,20 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone # copy webapp files COPY .. /var/www -# install composer +# install & run composer + #COPY ./docker/auth.json /root/.composer/auth.json +RUN echo "COMPOSER_TOKEN" +RUN echo "COMPOSER_TOKEN" +RUN echo $(COMPOSER_TOKEN) +RUN echo "GITHUB_TOKEN" +RUN echo $(GITHUB_TOKEN) +RUN echo "COMPOSER_AUTH" +RUN echo $(COMPOSER_AUTH) > /root/.composer/auth.json + RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer # run composer RUN composer install -## TODO eigenlijk wil je een image zonder dev packages. -##RUN composer install --no-dev --no-scripts # install self signed certifcates to thrust other local dev environments COPY ./docker/certificates/docker.dev.crt /usr/local/share/ca-certificates @@ -55,5 +75,6 @@ RUN chmod ugo+x /entrypoint.sh RUN php artisan optimize ENTRYPOINT /entrypoint.sh +EXPOSE 9000 CMD ["php-fpm"]