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

The plugin cannot guess docker container name #21

Open
phaberest opened this issue Jan 18, 2023 · 4 comments
Open

The plugin cannot guess docker container name #21

phaberest opened this issue Jan 18, 2023 · 4 comments

Comments

@phaberest
Copy link

phaberest commented Jan 18, 2023

I'm trying to call artisan and hitting tab inside a project that uses app as docker container name for the laravel instance, but I'm getting the error

service "php" is not running container #1

If I manually call the docker-compose exec it works

❯ docker-compose exec app php artisan
Laravel Framework 9.46.0

Usage:
  command [options] [arguments]
...

And the weird thing is that if I call the same command you are using inside the plugin to get the container name I get app as container name

❯ docker-compose ps --services 2>/dev/null | grep 'app\|php\|api\|workspace\|laravel\.test\|webhost'

app

After investigating a bit, looks like docker_compose_service_name is empty when executed from the plugin


OS: MacOS 13.1 (22C65) on a Macbook M1 2021
Shell: zsh 5.8.1 (x86_64-apple-darwin22.0) with Oh My Zsh
Docker: Docker version 20.10.21, build baeda1f

@phaberest
Copy link
Author

Turns out it works if I force _docker_compose_cmd function to always return docker-compose even though I have docker compose

❯ docker compose version
Docker Compose version v2.13.0

@phaberest phaberest changed the title Sounds like it doesn't find app docker container The plugin cannot guess container name Jan 18, 2023
@phaberest phaberest changed the title The plugin cannot guess container name The plugin cannot guess docker container name Jan 18, 2023
@owrasor
Copy link

owrasor commented Apr 16, 2023

I have the same problem.

@phaberest
Copy link
Author

I ended up hardcoding docker-compose at least it works for now. Will try to give it another look, but as of now I just needed it to work

@owrasor
Copy link

owrasor commented Apr 17, 2023

I ended up hardcoding docker-compose at least it works for now. Will try to give it another look, but as of now I just needed it to work

I did the same.

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

No branches or pull requests

2 participants