'AWS CodeBuild Error, unsupported runtime version PHP 8.0
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` 🏗"
Solution 1:[1]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Marcin |
