Skip to content

Instantly share code, notes, and snippets.

@nullthefirst
Created August 18, 2019 07:03
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 nullthefirst/500523eab7f580a7802db4f26b3956e9 to your computer and use it in GitHub Desktop.
Save nullthefirst/500523eab7f580a7802db4f26b3956e9 to your computer and use it in GitHub Desktop.
Basic Docker commands for Container Services
docker stack ls # List stacks or apps
docker stack deploy -c <composefile> <appname> # Run the specified Compose file
docker service ls # List running services associated with an app
docker service ps <service> # List tasks associated with an app
docker inspect <task or container> # Inspect task or container
docker container ls -q # List container IDs
docker stack rm <appname> # Tear down an application
docker swarm leave --force # Take down a single node swarm from the manager
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment