Docker

From John Freier
Revision as of 14:42, 6 September 2019 by Jfreier (Talk | contribs) (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...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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 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