I am working with AWS CodeBuild, I am facing this issue where I am building a docker image for deployment. However, I am facing this issue where AWS shows me the error message of
Unknown runtime version named '8.0' of php. This build image has the following versions: 7.3, 7.4
However, in the documentation it says that it supports PHP V 8.0.
Note that I am working with Laravel 9.0 with Laravel Sail, MySQL, Redis and MailHog containers.
I am attaching my buildspec.yml file for reference
version: 0.2
phases:
install:
runtime-versions:
php: 8.0
commands:
- echo "PHP Version ⬇"
- php -v
- echo "Initiation of build "
- echo "Installing Composer "
- curl -s https://getcomposer.org/installer | php
- mv composer.phar /usr/local/bin/composer
- echo "Installing dependencies "
- composer install
- echo "Installed dependencies "
build:
commands:
- echo "Building "
- composer build
- echo "Built "
post_build:
commands:
- echo "Post build "
- echo "Build completed on `date` "