2、docker镜像操作
#列出本地镜像 ->docker images #拉取镜像 ->docker pull registry:2.4.1 #删除镜像 ->docker rmi registry:2.4.1 #导出镜像 ->docker save -o jenkins.tar.gz jenkins/jenkins #导入镜像 ->docker load -i jenkins.tar.gz #修改本地镜像 ->docker run -t -i registry:2.4.1 /bin/bash ->[执行修改命令] ->exit ->docker commit -m "[注释]" -a "[作者]" 0b2616b0e5a8 registry:[my-tag] #利用Dokerfile来修改本地镜像 ->mkdir ./my-registry ->cd ./my-registry -> vim ./Dockerfile #编辑Dockerfile内容 FROM registry:2.4.1 MAINTAINER cyh <cyh@docker.com> RUN echo 'hello word!' ->docker build -t="cyh/registry:2.4.1" ./ docker build -t jdk8:141 . -f jdk8-dockerfile docker build -t jdk8-2:141 . -f jdk8-dockerfile