diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..2bfbe90fd9b70c81c2bc817289632bb5b05f53cc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,36 @@ +# This file is a template, and might need editing before it works on your project. +FROM php:7.4-fpm +RUN apt-get update && apt-get install -y \ + libfreetype6-dev \ + libjpeg62-turbo-dev \ + libpng-dev \ + && docker-php-ext-configure gd --with-freetype --with-jpeg \ + && docker-php-ext-install -j$(nproc) gd + + +RUN echo "date.timezone=Europe/Paris" > /usr/local/etc/php/conf.d/timezone.ini +RUN echo "opcache.enable_cli=1" > /usr/local/etc/php/conf.d/opcache.ini +RUN echo "opcache.revalidate_freq=500" >> /usr/local/etc/php/conf.d/opcache.ini +RUN echo "opcache.memory_consumption=128" >> /usr/local/etc/php/conf.d/opcache.ini +RUN echo "opcache.interned_strings_buffer=8" >> /usr/local/etc/php/conf.d/opcache.ini +RUN echo "opcache.max_accelerated_files=4000" >> /usr/local/etc/php/conf.d/opcache.ini +RUN echo "opcache.fast_shutdown=1" >> /usr/local/etc/php/conf.d/opcache.ini +RUN rm -f /usr/local/etc/php/conf.d/xdebug.ini + +WORKDIR tms + +RUN echo "${env_test}" > .env + +RUN curl -sS https://getcomposer.org/installer | php +RUN php composer.phar install + +RUN npm cache clean -f +RUN npm install -g n +RUN n stable +RUN curl -o- -L https://yarnpkg.com/install.sh | bash +RUN export PATH="$HOME/.yarn/bin:$PATH" +RUN yarn install +RUN yarn encore dev + +EXPOSE 8000/tcp +CMD symfony server:start