<commit_before>FROM php:7.2.34-fpm
#Docker官方說明文件
#https://hub.docker.com/_/php/
RUN apt-get update && apt-get install -y \
		libfreetype6-dev \
		libjpeg62-turbo-dev \
                #====安裝mcrypt====
                autoconf \
                libc-dev \
                pkg-config \
		libmcrypt-dev \
                #==================
                libsnmp-dev \
                libsmi2-common \
                libsmi2-dev \
                libperl-dev \
                snmp \
		libpng-dev \
		ca-certificates \
		curl \
		xz-utils \
                sudo \
                cron \
                inotify-tools \
                git \
                wget \
                libmagickwand-dev \
                libldb-dev \
                libldap2-dev \
                libsasl2-dev \
                python \
                vim \
                unzip \
                mariadb-client \
                zip \
                libgeoip-dev \
                libpq-dev \
                libzip-dev \
                libbz2-dev \
                libgd-dev \
                libjpeg-dev \
                libgif-dev \
                libxml2-dev \
                apt-utils \
                supervisor \
                wget \
                && docker-php-ext-install -j$(nproc) pdo_mysql mysqli ldap pgsql pdo_pgsql snmp\
                && docker-php-ext-install -j$(nproc) exif hash gettext sockets ctype xml zip pcntl bcmath intl\
                && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/  \
                && docker-php-ext-install -j$(nproc) gd

#docker-php-ext-install 可安裝外掛大概如下:
#bcmath bz2 calendar ctype curl dba dom enchant exif fileinfo filter ftp gd gettext gmp hash iconv imap interbase intl json ldap mbstring mysqli oci8 odbc opcache pcntl pdo pdo_dblib pdo_firebird pdo_mysql pdo_oci pdo_odbc pdo_pgsql pdo_sqlite pgsql phar posix pspell readline recode reflection session shmop simplexml snmp soap sockets sodium spl standard sysvmsg sysvsem sysvshm tidy tokenizer wddx xml xmlreader xmlrpc xmlwriter xsl zend_test zip

RUN  pecl install xdebug \
     pecl install redis \
     pecl install imagick \
     pecl install swoole \
     && docker-php-ext-enable xdebug

#建立Dlaravel的使用者
RUN adduser --disabled-password --gecos "" dlaravel &&\
echo "dlaravel ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/dlaravel && \
chmod 0440 /etc/sudoers.d/dlaravel

#安裝composer
RUN EXPECTED_SIGNATURE=$(wget -q -O - https://composer.github.io/installer.sig); \
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"; \
ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');"); \
php composer-setup.php; \
php -r "unlink('composer-setup.php');"; \
mv composer.phar /usr/local/bin/composer; \ <commit_msg>Add bz2 extension<commit_after>FROM php:7.2.34-fpm
#Docker官方說明文件
#https://hub.docker.com/_/php/
RUN apt-get update && apt-get install -y \
		libfreetype6-dev \
		libjpeg62-turbo-dev \
                #====安裝mcrypt====
                autoconf \
                libc-dev \
                pkg-config \
		libmcrypt-dev \
                #==================
                libsnmp-dev \
                libsmi2-common \
                libsmi2-dev \
                libperl-dev \
                snmp \
		libpng-dev \
		ca-certificates \
		curl \
		xz-utils \
                sudo \
                cron \
                inotify-tools \
                git \
                wget \
                libmagickwand-dev \
                libldb-dev \
                libldap2-dev \
                libsasl2-dev \
                python \
                vim \
                unzip \
                mariadb-client \
                zip \
                libgeoip-dev \
                libpq-dev \
                libzip-dev \
                libbz2-dev \
                libgd-dev \
                libjpeg-dev \
                libgif-dev \
                libxml2-dev \
                apt-utils \
                supervisor \
                wget \
                && docker-php-ext-install -j$(nproc) pdo_mysql mysqli ldap pgsql pdo_pgsql snmp bz2\
                && docker-php-ext-install -j$(nproc) exif hash gettext sockets ctype xml zip pcntl bcmath intl\
                && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/  \
                && docker-php-ext-install -j$(nproc) gd

#docker-php-ext-install 可安裝外掛大概如下:
#bcmath bz2 calendar ctype curl dba dom enchant exif fileinfo filter ftp gd gettext gmp hash iconv imap interbase intl json ldap mbstring mysqli oci8 odbc opcache pcntl pdo pdo_dblib pdo_firebird pdo_mysql pdo_oci pdo_odbc pdo_pgsql pdo_sqlite pgsql phar posix pspell readline recode reflection session shmop simplexml snmp soap sockets sodium spl standard sysvmsg sysvsem sysvshm tidy tokenizer wddx xml xmlreader xmlrpc xmlwriter xsl zend_test zip

RUN  pecl install xdebug \
     pecl install redis \
     pecl install imagick \
     pecl install swoole \
     && docker-php-ext-enable xdebug

#建立Dlaravel的使用者
RUN adduser --disabled-password --gecos "" dlaravel &&\
echo "dlaravel ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/dlaravel && \
chmod 0440 /etc/sudoers.d/dlaravel

#安裝composer
RUN EXPECTED_SIGNATURE=$(wget -q -O - https://composer.github.io/installer.sig); \
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"; \
ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');"); \
php composer-setup.php; \
php -r "unlink('composer-setup.php');"; \
mv composer.phar /usr/local/bin/composer; \ 
{'fraction_non_alphanumeric': 0.10453085979307884, 'fraction_numerical': 0.008205494113449875, 'mean_word_length': 1.544010889292196, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 14}, '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': '7132732', 'n_tokens_mistral': 1973, 'n_tokens_neox': 1818, 'n_words': 397}