문제

I created an image from a running container, which had a volume mapped at the time, e.g.: -v /home/user/myproject/xyz:/opt/xyz. Now, when I run that image, e.g.: docker run -i -t myimage bash, there is a mount in /opt/xyz. There isn't any files in it, but I cannot delete or unmount that folder.

Anyone knows how to get rid of that binding?..

UPDATE: one method I found is to start a container, export it, then import it back as a new image

도움이 되었습니까?

해결책

This is not currently supported. I would do one of two things:

  • Ignore the directory. If there aren't any files in it then it shouldn't be making any difference.
  • Create the image again, using a Dockerfile - this is best practice.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top