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

wp-cli exited (0) #4

Open
daqarash opened this issue Jul 29, 2021 · 3 comments
Open

wp-cli exited (0) #4

daqarash opened this issue Jul 29, 2021 · 3 comments

Comments

@daqarash
Copy link

Hi there!

I am using this repo. for my local dev setup. Somehow I run into this issue where wp-cli shows (grey icon showing the container is not running. It says EXITED (0).)

If I remove the wp-cli container everything else works fine.

Screenshot:
image

When I click the wp-cli container to see the logs show this
image

I appreciate it if you could help.

@daqarash
Copy link
Author

Hi there!

I am using this repo. for my local dev setup. Somehow I run into this issue where wp-cli shows (grey icon showing the container is not running. It says EXITED (0).)

If I remove the wp-cli container everything else works fine.

Screenshot:
image

When I click the wp-cli container to see the logs show this
image

I appreciate it if you could help.

In addition to that I tried to run this command I found on the official page wp-cli.org "PHP wp-cli.phar --info"

image

I then tried to run "docker-compose wp --rm wp user list"
image

It shows results. Am kinda confused.

@johnfmorton
Copy link

This isn't my repo, but I think the behavior you described initially is what is expected. It's what I see on my end and I would say it's working correctly.

The Docker dashboard shows the grayed out CLI container on purpose. There is no reason to have it active all the time using resources. When you run the command...

docker-compose run --rm wp user list     

It runs the container with the --rm flag which will shut it back down after successfully executing the command. The next time you need to execute something from the wp-cli, you just run the docker-compose run --rm wp COMMANDSHERE and it will reactivate the container, execute your function, and then exit again.

@daqarash
Copy link
Author

This isn't my repo, but I think the behavior you described initially is what is expected. It's what I see on my end and I would say it's working correctly.

The Docker dashboard shows the grayed out CLI container on purpose. There is no reason to have it active all the time using resources. When you run the command...

docker-compose run --rm wp user list     

It runs the container with the --rm flag which will shut it back down after successfully executing the command. The next time you need to execute something from the wp-cli, you just run the docker-compose run --rm wp COMMANDSHERE and it will reactivate the container, execute your function, and then exit again.

Thanks John ✌️

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