Dockerfile - Remove inherited volumes from parent image?

I’m not seeing a way to override volumes when extending an image. Is there a way to do this or any plans to get this implemented in the future? Without this ability it really forces one down a volume path, which sometimes may not be desired.

My particular use case is for setting up a quick read only/no real persistence type of deal where I can containerize a legacy app for research where we package it along with data and deploy out without requiring any setup, such as mounting volumes etc. I can see this probably useful in university setups as well for courses where instructors point students to spin up from an image and they’re rolling without volume setup.

hey @brummy,
did you manage to solve your problem? How to overwrite inherited volumes from the parent image?

cheers,
Wojtek

@wklm I did not get anywhere in solving this. I did find this thread on github where there were discussions about adding this functionality and voted for it.

1 Like

See https://github.com/gdraheim/docker-copyedit