docker-library / php

Docker Official Image packaging for PHP
https://php.net
MIT License
3.84k stars 2k forks source link

required composer with php:8.1-apache #1465

Closed bathivinod closed 1 year ago

bathivinod commented 1 year ago

is there any version like php:8.1-apache with includes composer also or similar

damien-louis commented 1 year ago

I guess all Docker tags don't include Composer.

You can use it simply with a Dockerfile like this:

FROM php:8.1-apache

ENV COMPOSER_ALLOW_SUPERUSER 1

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
  && chmod +x /usr/local/bin/composer
bathivinod commented 1 year ago

Hi @damien-louis Thanks for providing input.

tianon commented 12 months ago

You can also copy it from the composer image: https://github.com/docker-library/drupal/blob/96f915e1503663db2bc6f7cff28774e62aeac4ca/10.1/php8.2/apache-bookworm/Dockerfile#L66