Answer the question
In order to leave comments, you need to log in
Laradock: why do I change the version of php-fpm (docker-compose build php-fpm) in one project folder and change the version in another folder?
I have some kind of tinny going on today :)
I decided to try the new PHP, I specially made a folder for it with the new Laradock (inside the new folder of the new project), and I had to run it there docker-compose build php-fpm
because otherwise it was PHP 7.4. despite the fact that .env had 8.0
So now I have php-fpm version 8.0 in all my projects :(
How did this happen?
After all, if Laradock is in a separate folder, it should be separate from other laradocks?
/proj1/Laradock/
/ proj2/Laradock/
and they turn out to be dependent on each other? how is it?
I also make different config paths for them:
DATA_PATH_HOST=~/.laradock/proj1
DATA_PATH_HOST=~/.laradock/proj2
how can they be divided at all??
I want to be able to run different versions of PHP in different projects - how can I do that?
Answer the question
In order to leave comments, you need to log in
In short, I had to read the doc)) they recommend changing the value:
COMPOSE_PROJECT_NAME
now .env
I’m trying it, if it works out
, I’ll unsubscribe PS In general, yes, this is the solution. If you don't set the variable COMPOSE_PROJECT_NAME
to be unique for each instance of Laradock, then it "intersects" with each other, and you get all sorts of rubbish :D On the other hand, in this case it takes up less space. But if you need different Laradock configurations with different PHP versions, then COMPOSE_PROJECT_NAME
you need to make this unique for a project that differs from the general mass (in my case, this is PHP 8.0, and I even managed to upgrade from PHP 8.1).
Run:
docker ps --filter "label=com.docker.compose.project" -q | xargs docker inspect --format='{{index .Config.Labels "com.docker.compose.project"}}'| sort | uniq
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question