Skip to content

Commit

Permalink
Nog een test met tags
Browse files Browse the repository at this point in the history
  • Loading branch information
dasscheman committed Jul 1, 2024
1 parent 7597d8e commit 03457b2
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions docker/backend.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,57 @@ 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 \
&& docker-php-ext-enable mcrypt

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

# 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
Expand All @@ -55,5 +75,6 @@ RUN chmod ugo+x /entrypoint.sh
RUN php artisan optimize

ENTRYPOINT /entrypoint.sh
EXPOSE 9000

CMD ["php-fpm"]

0 comments on commit 03457b2

Please sign in to comment.