Last active
November 8, 2019 11:01
-
-
Save akumbhani66/b09b5c7310f9caebb28d48d23f070bdf to your computer and use it in GitHub Desktop.
This file contains 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
// To remove all process | |
docker rm -f $(docker ps -a -q) | |
// To remove all images | |
docker rm -f $(docker images -q) | |
// To stop running containers | |
docker stop -f $(docker ps -q) | |
// To remove images with same tag | |
docker rmi $(docker images -qa -f 'dangling=true') | |
// To run container in interactive mode | |
docker exec -it containerId /bin/sh | |
// To run image as container in interactive mode | |
docker run -i -t imageId /bin/sh | |
// To build docker image | |
docker build . -t temp | |
// To tag docker image | |
docker image tag cd45ab2c7cd1 myapp:1.0-recovered |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment