Difference between revisions of "Docker"
From John Freier
(Created page with "This is a page all about Docker and helpful commands. == Docker Images == '''List''' This will show a list of all docker images. docker images ""Remove"" This will remov...") |
|||
Line 1: | Line 1: | ||
This is a page all about Docker and helpful commands. | This is a page all about Docker and helpful commands. | ||
+ | |||
+ | == Docker File == | ||
Revision as of 13:42, 6 September 2019
This is a page all about Docker and helpful commands.
Docker File
Docker Images
List This will show a list of all docker images.
docker images
""Remove"" This will remove an image from the list.
docker rmi {imagename}:{tag}
You might need to force it.
docker rmi -f {imagename}:{tag}
""Run"" This is how you run an image
docker run -it {imagename}:{tag}
To open the ports
docker run -p 8080:8080 -it {imagename}:{tag}
To run the image in a detacted container for it run in the background.
docker run -d -it {imagename}:{tag}
To run an image and go right into bash for the starting point.
docker run -it --entrypoint "/bin/bash" {imagename}:{tag}
To get into bash for a container.
docker exec -it <container id> /bin/bash