docker修改容器内容后如何发布新tag

关于如何修改容器内容可以参考上篇。
1,修改完容器内容后需要先commit生成一个不同tag的镜像。

sudo docker commit change_router wxm888/docker_demo_koa:1.0.1

2,查看生成成功

kason@kason-virtual-machine:~/work/docker_demo$ sudo docker images 
REPOSITORY               TAG          IMAGE ID       CREATED             SIZE
wxm888/docker_demo_koa   1.0.1        d0a53bc34108   53 seconds ago      69.8MB
docker_demo              latest       af2b81db3efe   About an hour ago   69.8MB
wxm888/docker_demo_koa   latest       af2b81db3efe   About an hour ago   69.8MB
wxm888/test03            v3           507c0d3b8f81   2 weeks ago         921MB
node                     8.9-alpine   406f227b21f5   3 years ago         68.1MB

3,docker login登录
4,docker push推送到docker hub

sudo docker push wxm888/docker_demo_koa:1.0.1

![上传中...]()

你可能感兴趣的