diff --git a/Dockerfile b/Dockerfile index d7fe370..4b33f15 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # Copyright (c) 2024 RFull Development # This source code is managed under the MIT license. See LICENSE in the project root. -FROM php:lastest +FROM php:latest # Install dependencies RUN apt update && \ diff --git a/README.md b/README.md index cdf8899..72c9015 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ This repository is a Dev Container for PHP. | Base image and tags | php:*tag* | | Target platform | linux/x64, linux/arm64 | | Container registry's URL | https://hub.docker.com/r/ryotafunaki/devcontainer-php/ | -| Installed packages | .NET SDK 8.0, Kiota | +| Installed packages | .NET SDK 8.0, Kiota, Composer | ## How to use diff --git a/root_shells/shells.d/install_composer.sh b/root_shells/shells.d/install_composer.sh new file mode 100644 index 0000000..fcde0a7 --- /dev/null +++ b/root_shells/shells.d/install_composer.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# Copyright (c) 2024 RFull Development +# This source code is managed under the MIT license. See LICENSE in the project root. +php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" +php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" +php composer-setup.php +php -r "unlink('composer-setup.php');" +mv composer.phar /usr/local/bin/composer +exit 0