标签:format -- ash orm inspect state 基于 镜像 java
docker search java
docker pull java
docker images
docker rmi hello-world
docker rmi -f $(docker images)
docker commit -m "centos add jdk8" -a "M.Zeng" 8ea45e784e92 zeng/java:8
docker save -o xxx.tar java:8
导入镜像 docker load --input xxx.tar
docker run java
docker run -d -p 80:80 --name=nginx-container nginx
docker logs CONTAINER ID
docker ps
docker stop CONTAINER ID
docker stop 0e64a1525f94
docker kill CONTAINER ID
docker start CONTAINER ID
docker restert CONTAINER ID
docker attach CONTAINER ID
docker exec -it CONTAINER ID /bin/bash
docker inspect --format “{{.State.Pid}}” CONTAINER ID
nsenter --target PID --mount --uts --ipc --net --pid
docker rm CONTAINER ID
docker rmi -f $(docker ps -a -q)
docker export -o xxx.tar CONTAINER ID
或者 docker export CONTAINER ID >xxx.tar
docker import xxx.tar - zeng/java:8
docker stop `docker ps -a|awk ‘{print $1}‘`
docker images|grep none|awk ‘{print $3}‘|xargs docker rmi
docker start $(docker ps -a | awk ‘{ print $1}‘ | tail -n +2)
docker stop $(docker ps -a | awk ‘{ print $1}‘ | tail -n +2)
docker rm $(docker ps -a | awk ‘{ print $1}‘ | tail -n +2)
docker中 删除所有的镜像 docker rmi $(docker images | awk ‘{print $3}‘ |tail -n +2)
标签:format -- ash orm inspect state 基于 镜像 java
原文地址:https://www.cnblogs.com/ggza/p/9448079.html