Last active
May 27, 2019 17:04
-
-
Save verticalgrain/31e91c709c57f65c3797e95af17764d4 to your computer and use it in GitHub Desktop.
Docker Gist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// clean cache and do some ot her scary stuff | |
docker system prune -a | |
// List all containers (only IDs) | |
docker ps -aq. | |
// Stop all running containers. | |
docker stop $(docker ps -a -q) | |
// Remove all containers. | |
docker rm $(docker ps -a -q) | |
// Remove all images. | |
docker rmi $(docker images -q) | |
// Start container | |
docker container start containername | |
// SSH Into container | |
docker exec -it containername /bin/bash | |
// Start docker machine | |
eval $(docker-machine env default) | |
docker-machine ls | |
// | |
// Copy to and from docker machine | |
docker cp foo.txt mycontainer:/foo.txt | |
docker cp mycontainer:/foo.txt foo.txt | |
docker cp src/. mycontainer:/target | |
docker cp mycontainer:/src/. target | |
// List running containers | |
docker container ls | |
// Check container status | |
docker-compose ps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment