Last active
December 21, 2017 03:47
-
-
Save gastonfig/9ee59dd84c1e3bd0bdbff4be353cfc58 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
# Useful Docker Container Commands | |
docker ps -a # list all containers | |
docker run -td -i --name <container_name> -p 4567:4567 <image_name> # create a running container from an image. | |
docker exec -it <mycontainer> /bin/bash sleep infinity # get into the container | |
docker stop $(docker ps -a -q) # Stop ALL containers | |
docker rm $(docker ps -a -q) # Delete ALL containers |
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
# Useful Docker Image Commands | |
docker images -a # list all images. | |
docker build -t <image_name> docker/ # build the image from the dockerfile in the `docker` directory. | |
docker rmi $(docker images -q) # Delete ALL images |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment