| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- #!/bin/bash
- # Setup a php:8.2-fpm docker image
- # We need to install dependencies only for Docker
- [[ ! -e /.dockerenv ]] && exit 0
- # Quit on error
- set -xe
- # Install packages
- apt-get update
- apt-get install -yqq --fix-missing apt-utils gnupg git build-essential openssh-client zip
- apt-get update
- apt-get install -yqq --fix-missing --no-install-recommends unzip zlib1g-dev libicu-dev g++ \
- libzip-dev libpng-dev libtidy-dev libssl-dev \
- libxslt-dev libxrender-dev libxrender1 libxt6 libxtst6 openssh-server \
- xorg iputils-ping wget gdebi ca-certificates wget \
- fontconfig acl procps libmagickwand-dev imagemagick
- apt-get clean
- rm -r /var/lib/apt/lists/*
- # Configure docker
- #docker-php-ext-configure intl
- #docker-php-ext-install intl opcache pdo_mysql exif bcmath calendar gd tidy
- #docker-php-ext-enable libxslt-dev
- #docker-php-ext-enable intl
- #docker-php-ext-enable exif
- #docker-php-ext-enable tidy
- #docker-php-ext-install zip
- #docker-php-ext-install xsl
- #pecl install apcu-5.1.21
- pecl install imagick
- docker-php-ext-enable imagick
- # Install XDebug (required for coverage)
- pecl install xdebug
- docker-php-ext-enable xdebug
- # Run ssh-agent and add private key (/!\ Attention: la configuration du SSH est indispensable pour pouvoir cloner notre repo foselastica)
- eval $(ssh-agent -s)
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- git config --global user.email "exploitation@opentalent.fr"
- git config --global user.name "git"
- # Install composer
- curl -sS https://composer.github.io/installer.sig > installer.sig
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
- php -r "if (hash_file('SHA384', 'composer-setup.php') === file_get_contents('installer.sig')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
- php composer-setup.php
- php -r "unlink('composer-setup.php'); unlink('installer.sig');"
- # Config php
- echo "memory_limit=2096M" > /usr/local/etc/php/conf.d/memory-limit.ini
- # Install modules
- HOST=ci php composer.phar install --no-interaction --ignore-platform-reqs
|