docker删除images中定义好的Volumes
天蓬老师
天蓬老师 2017-04-25 09:02:05
0
1
623

docker的image中已经定义好了一系列volume目录。
由于几个目录位置并不合理所以需要删除volume重新创建。
但是不知道怎么删除volume并提交到镜像。

volume的创建方式: docker run -v /xxx [image] /bin/bash

由于经验不足,没有预留Dockerfile和对应的tag,只能再当前镜像内做修改……

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all (1)
習慣沉默

First, check whether the image is yours.
If so, modify the Dockerfile to delete the unnecessary data volumes and rebuild the image.
If not, the person who made the mirror must have his own intention in setting the data volume here. Why should you delete the data volume he set? If you don't want to use it, just create a new one and use it yourself.

If the data volume is created by docker run -v, delete the container and re-create it without this data volume.

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!