PHP Classes

File: _docker/cli/Dockerfile

Recommend this page to a friend!
  Classes of Insolita   PHP Async HTTP Client Benchmarks   _docker/cli/Dockerfile   Download  
File: _docker/cli/Dockerfile
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP Async HTTP Client Benchmarks
Measure the performance of different HTTP clients
Author: By
Last change:
Date: 3 years ago
Size: 2,289 bytes
 

Contents

Class file image Download
FROM php:7.4-cli # Prepare Debian environment ENV DEBIAN_FRONTEND noninteractive # Performance optimization - see https://gist.github.com/jpetazzo/6127116 # this forces dpkg not to call sync() after package extraction and speeds up install RUN echo "force-unsafe-io" > /etc/dpkg/dpkg.cfg.d/02apt-speedup # we don't need and apt cache in a container RUN echo "Acquire::http {No-Cache=True;};" > /etc/apt/apt.conf.d/no-cache ARG USERNAME=appuser ARG GROUP=appuser ARG PASSWD=pass ARG UID=1000 ARG GID=1000 ARG HOME=/home/$USERNAME ARG ALLOW_SUDO=1 RUN apt-get update && \ apt-get install -y --no-install-recommends \ libicu-dev \ libzip-dev \ libpq-dev \ sudo \ git \ unzip\ libxml2-dev \ && docker-php-ext-install -j$(nproc) pcntl \ && docker-php-ext-install -j$(nproc) zip \ && docker-php-ext-install -j$(nproc) pgsql \ && docker-php-ext-install -j$(nproc) pdo_pgsql \ && docker-php-ext-install -j$(nproc) sockets \ && docker-php-ext-install -j$(nproc) xmlrpc \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* RUN groupadd --gid $GID $GROUP \ && useradd --groups ${GROUP},sudo \ --uid $UID --gid $GID --shell /bin/bash --create-home --home $HOME $USERNAME \ && echo "${PASSWD}\n${PASSWD}\n"|passwd $USERNAME &&\ if [ $ALLOW_SUDO -eq 1 ]; then echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers; fi # Initialize application WORKDIR /app # Install composer ENV COMPOSER_HOME $HOME/.composer/ ENV PATH $HOME/.composer/vendor/bin:$PATH RUN curl -o /tmp/composer-setup.php https://getcomposer.org/installer \ && curl -o /tmp/composer-setup.sig https://composer.github.io/installer.sig \ # Make sure we're installing what we think we're installing! && php -r "if (hash('SHA384', file_get_contents('/tmp/composer-setup.php')) !== trim(file_get_contents('/tmp/composer-setup.sig'))) { unlink('/tmp/composer-setup.php'); echo 'Invalid installer' . PHP_EOL; exit(1); }" \ && php /tmp/composer-setup.php --no-ansi --install-dir=/usr/local/bin --filename=composer --snapshot \ && rm -f /tmp/composer-setup.* \ && chown -R $USERNAME:$USERNAME $HOME USER $USERNAME