Last active
July 14, 2019 21:01
-
-
Save ohmydevops/ee581a9e40b6f6a448be76025ea604a8 to your computer and use it in GitHub Desktop.
docker cheat sheet
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
docker build -t myimagename . | |
docker run -p 4000:80 myimagename | |
docker run -d -p 4000:80 myimagename | |
docker exec -it [container-id] bash | |
docker ps | |
docker stop <hash> | |
docker ps -a | |
docker kill <hash> | |
docker rm <hash> | |
docker rm $(docker ps -a -q) | |
docker images -a | |
docker rmi <imagename> | |
docker rmi $(docker images -q) | |
docker login | |
docker tag <image> username/repository:tag | |
docker push username/repository:tag | |
docker run username/repository:tag |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment