frequently used docker commands.
container
run
run a container from a image
docker run -d -p 13008:6080 -p 13009:8060 --name cloudide registry.cn-shanghai.aliyuncs.com/rgsoft/cloudide_java:latest
stop
stop all docker container
docker container stop $(docker ps -qa)
stop all Docker containers that have a specific image ID as their ancestor.
docker container stop $(docker ps -qa --filter "ancestor=6b8e62f218e1")
prune
remove all Docker containers that have a specific image ID as their ancestor.
docker container rm $(docker ps -qa --filter "ancestor=98d8bb571885")
inspect
get container’s IP address
docker inspect <container ID or name> | grep "IPAddress"
image
build a image
docker build -t="cloudide-vnc-java:study" -f Dockerfile .
make a image from a container
docker commit <container id> <image name>
volume
system
show disk filesystem usage
docker system df