“Remove” a VOLUME in a Dockerfile

后端 未结 3 1673
-上瘾入骨i
-上瘾入骨i 2020-12-18 18:13

I have a Dockerfile extending FROM an image that declares a VOLUME. Is there a way to overwrite the VOLUME directive in such a way, th

3条回答
  •  情深已故
    2020-12-18 18:49

    There are cases when you can not modify the original Dockerfile - in my case an image from production. The only chance is to modify the metadata (with docker save/load actions). As I need to that regulary, I have created a little script for that, have a look at docker-copyedit if that can help you.

提交回复
热议问题