<commit_before>FROM php:7-fpm

# Install modules
RUN apt-get update && apt-get install -y \
    git \
    libfreetype6-dev \
    libjpeg62-turbo-dev \
    libmcrypt-dev \
    libpng12-dev \
	libicu-dev \
	mysql-client && \
	docker-php-ext-install mcrypt && \
	docker-php-ext-install intl && \
    docker-php-ext-install pdo && \
    docker-php-ext-install pdo_mysql && \
    docker-php-ext-install mysqli && \
    docker-php-ext-install mbstring && \
    docker-php-ext-install opcache && \
    docker-php-ext-install zip && \
    docker-php-ext-install exif && \
    ## APCu
    pecl install apcu && \
    docker-php-ext-enable apcu

RUN apt-get update && apt-get install -y \
    && docker-php-ext-install -j$(nproc) iconv mcrypt \
    && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
    && docker-php-ext-install -j$(nproc) gd

## Install Composer
ENV COMPOSER_ALLOW_SUPERUSER 1
WORKDIR /app
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer
COPY composer.json ./
RUN composer install --no-interaction


ENV HOME /app
COPY . ./

ONBUILD php app/console doctrine:database:create --if-not-exists
ONBUILD php app/console doctrine:schema:update --force
ONBUILD php app/console doctrine:fixtures:load --no-interaction
ONBUILD chown www-data:www-data -R /app
ONBUILD chown www-data:www-data -R /tmp<commit_msg>upgrade to PHP7 and APCu install<commit_after>FROM php:7-fpm

# Install modules
RUN apt-get update && apt-get install -y \
    git \
    libfreetype6-dev \
    libjpeg62-turbo-dev \
    libmcrypt-dev \
    libpng12-dev \
	libicu-dev \
	mysql-client && \
	docker-php-ext-install mcrypt && \
	docker-php-ext-install intl && \
    docker-php-ext-install pdo && \
    docker-php-ext-install pdo_mysql && \
    docker-php-ext-install mysqli && \
    docker-php-ext-install mbstring && \
    docker-php-ext-install opcache && \
    docker-php-ext-install zip && \
    docker-php-ext-install exif && \
    ## APCu
    pecl install apcu && \
    docker-php-ext-enable apcu

RUN apt-get update && apt-get install -y \
    && docker-php-ext-install -j$(nproc) iconv mcrypt \
    && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
    && docker-php-ext-install -j$(nproc) gd

## Install Composer
ENV COMPOSER_ALLOW_SUPERUSER 1
WORKDIR /app
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer
COPY . ./
RUN composer install --no-interaction


ENV HOME /app


ONBUILD php app/console doctrine:database:create --if-not-exists
ONBUILD php app/console doctrine:schema:update --force
ONBUILD php app/console doctrine:fixtures:load --no-interaction
ONBUILD chown www-data:www-data -R /app
ONBUILD chown www-data:www-data -R /tmp
{'fraction_non_alphanumeric': 0.1391459074733096, 'fraction_numerical': 0.005338078291814947, 'mean_word_length': 2.803788903924222, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '280509', 'n_tokens_mistral': 1052, 'n_tokens_neox': 979, 'n_words': 216}