Docker基本映像包括一个卷。如何停止在派生图像中安装它 [英] Docker base image includes a volume. How can I stop mounting it in my derived image

查看:74
本文介绍了Docker基本映像包括一个卷。如何停止在派生图像中安装它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用卷的docker基本映像,该基本映像不受我的控制

I have a docker base image that uses a volume and the base image is out of my control

例如: VOLUME [ /我/路径]

我正在尝试构建未定义体积的派生图像。我希望/ my / path中的数据是瞬态的并且永不持久。

I'm trying to build a derived image that doesn't define a volume. I want the data in /my/path to be transient and never persisted.

是否可以禁用来自父容器的卷?

Is there a way I can disable a volume that came from a parent container?

推荐答案

这将是一个很棒的功能,不幸的是,似乎Docker团队取消了它的优先级。请参阅: https://github.com/moby/moby/issues/3465

This would be a great feature, unfortunately it seems like the Docker team has de-prioritized it. Refer to: https://github.com/moby/moby/issues/3465

目前,根据您的使用情况,Docker复制编辑可能是您的最佳选择。 https://github.com/gdraheim/docker-copyedit

For now, Docker copy edit may be your best option depending on your use case. https://github.com/gdraheim/docker-copyedit

这篇关于Docker基本映像包括一个卷。如何停止在派生图像中安装它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆