Think before you speak, read before you think.

docker使用

pull

docker pull centos

build

docker build -t jpuyy.com:master --rm=true .

对已有 image 再打一个 tag

docker tag jpuyy.com:master notexit.com:master

推到远端

docker push $REPO:$VER

复制文件到 docker 里

docker cp page.html elegant_noether:/user/local/apache2/htdocs

查看端口映射

docker port 10936519db14

找出一批 docker 容器在系统里的 pid

docker ps -a | grep -i demo1  | awk '{print $1}' | xargs docker inspect --format '{{.State.Pid}} {{.Name}}'

docker 修剪 清理 https://docs.docker.com/config/pruning/

docker system prune

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *