Codeignter php 7.2 setup

In Kinsta, I have already created an application with PHP 8.2. However, I want to use PHP 7.2 with CodeIgniter. I am only committing the index.php file from my Bitbucket account. Now, I want to downgrade PHP from 8.2 to 7.2 using a Dockerfile, but my deployment is always failing. What can I do to resolve this issue?

Here is my Dockerfile code:

Use the official NGINX image as the base image

FROM nginx:latest

Update package lists and install necessary packages

RUN apt-get update && apt-get install -y
curl
gnupg2
ca-certificates
lsb-release
&& rm -rf /var/lib/apt/lists/*

Add the PHP 7.2 repository

RUN echo “deb Index of /php/ $(lsb_release -sc) main” | tee /etc/apt/sources.list.d/php7.list
&& curl -fsSL https://packages.sury.org/php/apt.gpg | apt-key add -

Install PHP 7.2 and required extensions

RUN apt-get update && apt-get install -y
php7.2
php7.2-fpm
php7.2-cli
php7.2-common
php7.2-mysql
php7.2-curl
php7.2-json
php7.2-opcache
php7.2-mbstring
php7.2-xml
php7.2-zip
php7.2-gd
php7.2-bcmath
&& rm -rf /var/lib/apt/lists/*

Remove NGINX default configuration

RUN rm /etc/nginx/conf.d/default.conf

Copy your NGINX configuration file(s) to the container

COPY nginx.conf /etc/nginx/conf.d/

Expose ports

EXPOSE 80

Start NGINX

CMD [“nginx”, “-g”, “daemon off;”]

Can you please guide on it As much As possible?

Hello @threshold :wave:

Welcome to Kinsta community!

Deployment logs need to be checked and while they may be vague, it might provide us with enough information to see why the deployment is failing.

If you have the option, we advise opening a support chat and our engineers will take a look. If it’s a platform error, we’ll resolve it and if not, we’ll do our best to provide advice and guidance on resolving the error yourself.

If you can’t access Kinsta Support Chat, please let me know and we’ll find other way to review your application.

Kind regards