#!/usr/bin/env bash
# Prépare PHP + Composer + extensions + Node 20 pour le job release_gcms (Debian bookworm).
set -euo pipefail
export DEBIAN_FRONTEND=noninteractive
apt-get update -qq
apt-get install -y --no-install-recommends \
  git ca-certificates curl gnupg \
  zip unzip jq openssl \
  libicu-dev libzip-dev libpng-dev libjpeg62-turbo-dev libfreetype6-dev \
  libsqlite3-dev libonig-dev sqlite3 \
  libxml2-dev
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y --no-install-recommends nodejs
docker-php-ext-configure gd --with-freetype --with-jpeg
docker-php-ext-install -j"$(nproc)" \
  intl zip gd pdo_mysql pdo_sqlite bcmath opcache
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
composer --version
node --version
rm -rf /var/lib/apt/lists/*
