docker修改镜像中的文件

需求:修改镜像中的一个文件
实现:

 docker cp ./start-zookeeper 799e2dd22da4823dade9be242b9b8330f59474fa9bd4ca558db02691a3c20638:/opt/zookeeper/bin/

docker commit -m "修改start-zookeeper中的语法错误" -a "liyuan" 799e2dd22da4823dade9be242b
9b8330f59474fa9bd4ca558db02691a3 yuanxi2314/kubernetes-zookeeper1.0-3.4.10:v4.0

# docker hub已注册了一个账号id为yuanxi2314,且该账号下有名为kubernetes-zookeeper1.0-3.4.10的仓库
docker login

docker push yuanxi2314/kubernetes-zookeeper1.0-3.4.10:v4.0
 

你可能感兴趣的:(docker,kubernetes,容器)