docker build -t NAME .
#List Docker Images:
docker images
#Remove Docker Image
docker image rm -f ID
#Run: To run the container image called NAME with following options:
1. Map the host port 80 with container port 80
2. Limit memory to 1000MB
3. Limit CPU = 1
4. Assign name = NAME
--use the following command:
docker run --rm -it -p 80:80 -m 1000m --cpus=1 --name=NAME NAME
#List Docker processes
docker ps
#See a live stream of container(s) resource usage statistics (like top)
docker container stats
#Display the running processes of a container (one shot)
docker container top NAME
sudo iptables -t nat -L -n
#Commit Container or take a snapshot while running:
docker commit NAME NAME:run
No comments:
Post a Comment