Skip to content

Latest commit

 

History

History
18 lines (16 loc) · 558 Bytes

docker_fun.md

File metadata and controls

18 lines (16 loc) · 558 Bytes

Basic Docker Fun:

- Commands:
	- docker run <image>
	  - you  will create many containers if you execute docker run multiple times
	- docker start <name|id>
	- docker stop <name|id>
	- docker ps [-a include stopped containers]
	- docker rm <name|id>
	- docker pull <image from hub>

- Basic steps:
	- docker login <login to your docker hub>
	- docker pull <image name>
	- docker run -p 8080:80 <map the port 8080 to port 80>	
	- docker run --name <name> -d
	   -d: running in the background
	   --name: add a name to recognize your container