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

Provide "ddev poweroff" that shuts down all running containers #1588

Closed
jmarkel opened this issue May 13, 2019 · 3 comments
Closed

Provide "ddev poweroff" that shuts down all running containers #1588

jmarkel opened this issue May 13, 2019 · 3 comments
Labels
Prioritized We expect to do this in an upcoming release

Comments

@jmarkel
Copy link
Sponsor Contributor

jmarkel commented May 13, 2019

After shutting down or removing the last running ddev instance, there is still one container left running - the ssh-agent container. This can play havoc with other docker-based systems if one forgets to do this (which is very easy to forget):

Jeffreys-MacBook-Pro:jnjhwsch jeff$ ddev stop --all
Network ddev_default is external, skipping
Project jnjhwsch has been stopped.
Jeffreys-MacBook-Pro:jnjhwsch jeff$ docker ps
CONTAINER ID        IMAGE                        COMMAND                 CREATED             STATUS                  PORTS               NAMES
544bb46ac6b2        drud/ddev-ssh-agent:v1.7.0   "/entry.sh ssh-agent"   45 hours ago        Up 45 hours (healthy)                       ddev-ssh-agent
Jeffreys-MacBook-Pro:jnjhwsch jeff$
Jeffreys-MacBook-Pro:jnjhwsch jeff$ docker kill 544bb46ac6b2
544bb46ac6b2

I am proposing that ddev either provide a new command to completely shut itself down (like Lando's lando poweroff or, preferably, simply to kill that final container when the last running ddev instance is shut down or removed.

@rfay
Copy link
Member

rfay commented May 13, 2019

ddev remove --all --stop-ssh-agent (which becomes ddev stop --all --stop-ssh-agent in v1.8.0

ddev stop hasn't been recommended usage for some time (which is why it's changing behavior in v1.8.0, people kept using it, leaving containers around)

But I still agree that something like poweroff is a good idea.

@jmarkel
Copy link
Sponsor Contributor Author

jmarkel commented May 13, 2019

Thanks, @rfay.

OK, there's already a way to do it via command line - but it's too arcane to remember easily ;)

So yeah, poweroff or, better yet, recognize the need by context and do it without requiring any user intervention at all.

@rfay
Copy link
Member

rfay commented May 13, 2019

Well, the only thing that's left running currently (when no projects are running) is the ssh-agent container, and that's really intended to run until shutdown (because it keeps the ssh credentials for you).

But something like poweroff is in our future I think. Related: #1562 requesting cleanup and #1465 about cleaning up unused volumes. People have also requested ddev removedata or something of the type to replace ddev stop --remove-data

@rfay rfay added the Prioritized We expect to do this in an upcoming release label May 14, 2019
@rfay rfay added this to the v1.10 milestone Jun 28, 2019
@rfay rfay changed the title Provide a way to fully shut down Ddev Provide "ddev poweroff" that shuts down all running containers Jul 24, 2019
rfay added a commit to rfay/ddev that referenced this issue Jul 25, 2019
Thanks and tip of the hat to our friends at lando
@rfay rfay closed this as completed in 17b3d2b Jul 25, 2019
rfay added a commit to rfay/ddev that referenced this issue Jul 27, 2019
Thanks and tip of the hat to our friends at lando
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Prioritized We expect to do this in an upcoming release
Projects
None yet
Development

No branches or pull requests

2 participants