Closed MrLarkyy closed 2 months ago
What exact commands are you running to reproduce this?
I'm experiencing the same issue exactly like described
The new instance of the docker containers are created when I run
./vendor/bin/sail up -d
How are you stopping the project? Is this on a fresh project with unmodified docker-compose?
Hey! It is a fresh project. Ive tried to make multiple of the projects, it always happens. Only thing that I use is the sail up -d command
It always creates a new container with random UUID.
Here you can see that it even shows the UUID in the console.
Thank you for reporting this issue!
As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.
If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.
Thank you!
Does WSL show a different folder name each time you start WSL? Because the container name is determined from the current folder you are in.
Maybe there is a way to set the container name via an .env
entry. Probably needs a PR to sail.
The thing is that it did work at the first time. I've called my project testapp and even in wsl was testapp shown as well as in my docker. Another thing is that sometimes it works and sometimes it just creates a completely new container with random name as you can see on the screenshots. It is really strange.
So the problem itself does not lie with Sail but with Docker / WSL: https://docs.docker.com/compose/project-name/
You can attempt a PR where the project-name is defined in .env
and added to the docker compose command. If no .env
variable is defined the project folder should be used.
Why WSL sometimes mounts another random folder name instead of the correct name is not clear to me. Maybe try a bug report in WSL: https://github.com/microsoft/WSL
Thanks @Jubeki
Sail Version
1.29.1
Laravel Version
11.0.0
PHP Version
8.3.6
Operating System
Windows (WSL)
OS Version
23H2
Description
Hey I'm experiencing this issue whenever I run
sail up -d
I notice it creates a new docker container instead of using the previous already made one. This is occurring on a freshly installed Laravel application. I followed the Sail documentation for windowsSteps To Reproduce
follow the documentation Then: