diff options
Diffstat (limited to '.devcontainer/Dockerfile')
-rw-r--r-- | .devcontainer/Dockerfile | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index b674943a587..642ee36d1a1 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -4,7 +4,7 @@ ARG DEBIAN_FRONTEND=noninteractive # PHP RUN apt-get update -y && \ - apt install -y apache2 vim software-properties-common sudo nano + apt install -y apache2 vim software-properties-common sudo nano gnupg2 RUN apt-get install --no-install-recommends -y \ php8.1 \ @@ -36,6 +36,15 @@ RUN apt-get install --no-install-recommends -y \ nodejs \ npm +# Composer +# Download the Composer installer script to a temporary file +RUN curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php && \ + curl -sS https://composer.github.io/installer.sig -o /tmp/composer-setup.sig && \ + php -r "if (hash_file('sha384', '/tmp/composer-setup.php') !== trim(file_get_contents('/tmp/composer-setup.sig'))) { echo 'Composer installation failed, invalid hash'; exit(1); }" && \ + php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer && \ + rm /tmp/composer-setup.php /tmp/composer-setup.sig + + RUN echo "xdebug.remote_enable = 1" >> /etc/php/8.1/cli/conf.d/20-xdebug.ini && \ echo "xdebug.remote_autostart = 1" >> /etc/php/8.1/cli/conf.d/20-xdebug.ini @@ -52,7 +61,7 @@ RUN apt-get -y install \ curl \ gnupg-agent \ software-properties-common && \ - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \ + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \ add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ |