2

I am having issue writing to the mounted volume on host filesystem from docker container

Is there some special thing i have to do when building the container to make the container write data to the mounted volume on host for persistency?

I have seen containers that write to host filesystem like the official mysql docker image and several others but when i build my own images, and i mount the volume on host, i find out it doesn't write to host, but only reads from the host.

  • 1
    Please add the docker command and dockerfile – 030 Jul 11 '16 at 22:48
  • You need to map volumes from host to container when start container not in dockerfile. – Navern Jul 18 '16 at 19:20
0

I think for certain docker images, one need to give access to the host mounted volume to same ui/gid of running container to host as well for write to work properly

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.