I want to change the PHP version for development with Docker+Ubuntu+Lavel.

Asked 2 years ago, Updated 2 years ago, 62 views

I am currently trying to develop a web application on Ravel sail.
The environment is Docker+Ubuntu, but it does not match the PHP version of the rental server I rent, so I would like to lower the PHP version and develop it.

Current version

PHP 8.1.7
Ravel Framework 9.27.0
docker 20.10.16
Ubuntu 20.04.4 LTS\n\l

Current state

 curl-s https://larvel.build/example|bash

Downloading laravel sail in builds the above version.

What I've tried

in docker-compose.yml
context:./vendor/larvel/sail/runtimes/8.1
image —sail-8.1/app

context:./vendor/larvel/sail/runtimes/8.0
image —sail-8.0/app

Rewrite to

./vendor/bin/sail build --no-cache
./vendor/bin/sailup-d

I started the container in , but when I connected to localhost,

This page is not working No data was sent from localhost. ERR_EMPTY_RESPONSE

I can't see it next to you.

If possible, I would be happy if the Ravel version could be 6.X...

I'm sorry if it's a difficult question to understand because I just started learning.
Please let me know.

Thank you for your cooperation.

php ubuntu docker laravel

2022-09-30 18:09

1 Answers

Self-resolved.

I was able to install multiple php versions on Ubuntu and switch to update-alternates.

Thank you.


2022-09-30 18:09

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.