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` 🏗"
Php 8.0 is only supported if you use Ubuntu standard:5.0 CodeBuild image. The fact that you are getting your error, means that you use different image then Ubuntu standard:5.0.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With