Skip to content

Instantly share code, notes, and snippets.

@almokhtarbr
Created September 18, 2019 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save almokhtarbr/a553c2cd8c032318057832e7da162ef4 to your computer and use it in GitHub Desktop.
Save almokhtarbr/a553c2cd8c032318057832e7da162ef4 to your computer and use it in GitHub Desktop.
docker ps
// Also, you can restart your containers using the following command.
docker restart $(docker ps -q)
// You can kill all the containers using the following command.
docker kill $(docker ps -a -q)
// You can stop all the containers using the following command.
docker stop $(docker ps -aq)
// Now, again restart your container, if you have stopped your container.
docker-compose up -d nginx mysql phpmyadmin
// show only stopped containers
docker ps --filter "status=exited"
// show all containers
docker ps --all
// start containers
doccker start id id id id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment