anchor.diff:  ARG base_version=3.9
   ARG version=7.3
   ARG major=7
  +ARG composer_version=1.8.6
  +ARG blackfire_version=1.25.0
   
   FROM minidocks/base:3.5 AS v3.5
   
  
positive.code:     COMPOSER_MEMORY_LIMIT=-1 \
      CLEAN="$CLEAN:\$COMPOSER_CACHE_DIR/"
  
  RUN mkdir -p /var/www "$COMPOSER_HOME" "$COMPOSER_CACHE_DIR" && chown www-data:www-data /var/www "$COMPOSER_HOME" "$COMPOSER_CACHE_DIR" && chmod a+rwx "$COMPOSER_HOME" "$COMPOSER_CACHE_DIR"
  
  # Composer
  RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
      && php composer-setup.php --install-dir=/usr/bin --filename=composer --version="$COMPOSER_VERSION" \
      && php -r "unlink('composer-setup.php');" \
      && packages="webuni/composer-yaml-plugin webuni/composer-neon-plugin" \
      && if echo "5.6 7.0" | grep -qv "$version"; then packages="$packages localheinz/composer-normalize"; fi \
  
negative.code:     PHP_XDEBUG__REMOTE_HOST=172.17.0.1 \
      PHP_XDEBUG__REMOTE_PORT=9000 \
      PHP_XDEBUG__REMOTE_CONNECT_BACK=0 \
      PHP_XDEBUG__IDEKEY=PHPSTORM
  
  ARG blackfire_version
  
  RUN wget -O "/usr/lib/php${major}/modules/blackfire.so" https://packages.blackfire.io/binaries/blackfire-php/${blackfire_version}/blackfire-php-alpine_amd64-php-${version/./}.so \
      && mkdir /var/run/blackfire \
      && chmod a+x /var/run/blackfire/ "/usr/lib/php${major}/modules/blackfire.so" \
      && echo -e "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8707" > "${PHP_INI_DIR}/conf.d/blackfire.ini"
  