Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sail is not compatible with newer docker-compose version #639

Closed
Psanyi89 opened this issue Nov 25, 2023 · 9 comments
Closed

Sail is not compatible with newer docker-compose version #639

Psanyi89 opened this issue Nov 25, 2023 · 9 comments

Comments

@Psanyi89
Copy link

Sail Version

1.26.1

Laravel Version

10.32.1

PHP Version

8.2.12

Operating System

Windows (WSL)

OS Version

22H2

Description

After running sail up -d command the containers starts but but with a hash string name instead of the project name than if you call the "sail ps" command no container is running and you cannot stop it with the "down" command. In docker desktop you see it's running all images/services are running no error.
If you call the same command directly through docker-compose everything is okay container start with project name "ps" shows them and "down" shut it down
Docker Compose version v2.23.0-desktop.1
I think Sail is not compatible anymore with the latest docker version.

Steps To Reproduce

After running sail up -d command the containers starts but but with a hash string name instead of the project name than if you call the "sail ps" command no container is running and you cannot stop it with the "down" command. In docker desktop you see it's running all images/services are running no error.
If you call the same command directly through docker-compose everything is okay container start with project name "ps" shows them and "down" shut it down
Docker Compose version v2.23.0-desktop.1
I think Sail is not compatible anymore with the latest docker version.

@Psanyi89
Copy link
Author

D:\VS_Code_Workspaces\PHP\PrimaryHub>bash ./vendor/laravel/sail/bin/sail build
[+] Building 1.5s (16/16) FINISHED docker:default
=> [laravel.test internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s
=> [laravel.test internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 3.09kB 0.0s
=> [laravel.test internal] load metadata for docker.io/library/ubuntu:22.04 1.1s
=> [laravel.test 1/11] FROM docker.io/library/ubuntu:22.04@sha256:2b7412e6465c3c7fc5bb21d3e6f1917c167358449fecac8176c6e496e5c1f05f 0.0s
=> [laravel.test internal] load build context 0.1s
=> => transferring context: 99B 0.1s
=> CACHED [laravel.test 2/11] WORKDIR /var/www/html 0.0s
=> CACHED [laravel.test 3/11] RUN ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone 0.0s
=> CACHED [laravel.test 4/11] RUN apt-get update && mkdir -p /etc/apt/keyrings && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng 0.0s
=> CACHED [laravel.test 5/11] RUN setcap "cap_net_bind_service=+ep" /usr/bin/php8.2 0.0s
=> CACHED [laravel.test 6/11] RUN groupadd --force -g 1000 sail 0.0s
=> CACHED [laravel.test 7/11] RUN useradd -ms /bin/bash --no-user-group -g 1000 -u 1337 sail 0.0s
=> CACHED [laravel.test 8/11] COPY start-container /usr/local/bin/start-container 0.0s
=> CACHED [laravel.test 9/11] COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf 0.0s
=> CACHED [laravel.test 10/11] COPY php.ini /etc/php/8.2/cli/conf.d/99-sail.ini 0.0s
=> CACHED [laravel.test 11/11] RUN chmod +x /usr/local/bin/start-container 0.0s
=> [laravel.test] exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:13ea614ed50f5d68cb4854062095590a5d03a9ab3c0a3acbffd8c437b08a4681 0.0s
=> => naming to sail-8.2/app 0.0s

D:\VS_Code_Workspaces\PHP\PrimaryHub>bash ./vendor/laravel/sail/bin/sail up -d
[+] Building 0.0s (0/0) docker:default
[+] Running 11/11
✔ Network 241f76fd39452fc3c33e68e45cb99d63813f9dc2ff41f1d75f5cfb54b0bfbf74_sail Created 0.1s
✔ Volume "241f76fd39452fc3c33e68e45cb99d63813f9dc2ff41f1d75f5cfb54b0bfbf74_sail-mysql" Created 0.0s
✔ Volume "241f76fd39452fc3c33e68e45cb99d63813f9dc2ff41f1d75f5cfb54b0bfbf74_sail-redis" Created 0.0s
✔ Volume "241f76fd39452fc3c33e68e45cb99d63813f9dc2ff41f1d75f5cfb54b0bfbf74_sail-meilisearch" Crea... 0.0s
✔ Container 241f76fd39452fc3c33e68e45cb99d63813f9dc2ff41f1d75f5cfb54b0bfbf74-redis-1 Started 0.5s
✔ Container 241f76fd39452fc3c33e68e45cb99d63813f9dc2ff41f1d75f5cfb54b0bfbf74-mailpit-1 Started 0.5s
✔ Container 241f76fd39452fc3c33e68e45cb99d63813f9dc2ff41f1d75f5cfb54b0bfbf74-meilisearch-1 Starte... 0.5s
✔ Container 241f76fd39452fc3c33e68e45cb99d63813f9dc2ff41f1d75f5cfb54b0bfbf74-selenium-1 Started 0.5s
✔ Container 241f76fd39452fc3c33e68e45cb99d63813f9dc2ff41f1d75f5cfb54b0bfbf74-mysql-1 Started 0.5s
✔ Container 241f76fd39452fc3c33e68e45cb99d63813f9dc2ff41f1d75f5cfb54b0bfbf74-phpmyadmin-1 Started 0.3s
✔ Container 241f76fd39452fc3c33e68e45cb99d63813f9dc2ff41f1d75f5cfb54b0bfbf74-laravel.test-1 Start... 0.3s

D:\VS_Code_Workspaces\PHP\PrimaryHub>bash ./vendor/laravel/sail/bin/sail ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS

D:\VS_Code_Workspaces\PHP\PrimaryHub>bash ./vendor/laravel/sail/bin/sail down

D:\VS_Code_Workspaces\PHP\PrimaryHub>

@Psanyi89
Copy link
Author

sail up -d

SailUp

docker-compose up -d

DockerComposeUp

@pb30
Copy link

pb30 commented Nov 25, 2023

Try ./vendor/bin/sail up -d
Instead of bash ./vendor/laravel/sail/bin/sail

@Psanyi89
Copy link
Author

i tried it. It not helps., also one more thing the laravel welcome page cannot be reached from localhost:80 address only from 127.0.0.1:80
image
localhost:80
image

Copy link

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!

@Jubeki
Copy link
Contributor

Jubeki commented Nov 27, 2023

Regarding your 127.0.0.1:80 and localhost:80 Problem: You probably have an apache server running somewhere which listens on localhost:80. (Probably in WSL)

Though I can't help debug that docker compose problem, because it is working as expected on my machine.

@zunnur-trinovik
Copy link

You may try disable apache from autostart on WSL Ubuntu.

Here is the reference. https://askubuntu.com/questions/170640/how-do-i-stop-apache2-from-automatically-starting-on-boot

@Psanyi89
Copy link
Author

Thanks for the suggestions.
I found a workaround / or fix or my problem.
I had to mount the project folder to wsl by opening a terminal in the folder and give wsl command.
and there I can use ./vendor/bin/sail without any issue.
From windows the sail.bat file was not working for me.

@driesvints
Copy link
Member

Closing this issue because it's inactive, already solved, old or not relevant anymore. Feel to open up a new issue if you're still experiencing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants