5

I am creating a Docker Image from a base image that in one of its early layers mounts a volume to the current user home folder utilizing the VOLUME directive.

This mount leads to some unwanted file removals on my own image once it is run.

Is there a way to unmount this volume from within the Dockerfile of my image?

Fritz Duchardt
  • 11,026
  • 4
  • 41
  • 60
  • No, you can't. See also this question: https://stackoverflow.com/questions/44020785/remove-a-volume-in-a-dockerfile – Chris May 31 '18 at 12:31

0 Answers0