Answers: <p>I have been using Linux and since Docker volume caches the data, it is merely persistent until you remove it manually. In RHEL8, /var/lib/docker/volumes/, this is where all the volume mounts are stored. You can check if the same directory exists in MacOS. I haven't use Mac but I hope this helps.</p>
  
Answers: CC BY-SA 4.0
Answers: 2021-06-09T10:55:05.263Z
Answers: 2021-06-09T10:55:05.263Z
Answers: Divyaansh Jain
Body: <p>I run a docker image with a bind-mount pointing to a non-existing host directory. The docker image then created data into that volume, wherever it may be. The data is accessible on every docker run.</p>
  <p>If I then create that missing host directory and re-run the container, the new host folder is used, creating new data. When I remove it again, the old data shows up again.</p>
  <p>I have done <code>docker volume prune</code> and have nothing coming up with <code>docker volume ls</code>.</p>
  <p>When I remove the host directory again, then also remove the container and the image, then re-run the docker container, I can see the image getting re-downloaded, but then the old data is still there.</p>
  <p>How do I identify the location of the old data and interact with it?</p>
  <p>(This is on MacOS)</p>
  
Tags: <docker><volume><macos>
Title: Run docker with bind-mount pointing to non-existent host folder: Where is the data?
UserDisplayName: bebbi
ThreadText: # Run docker with bind-mount pointing to non-existent host folder: Where is the data?
  
  (Asked by: username_0 on 2021-06-08)
  
  I run a docker image with a bind-mount pointing to a non-existing host directory. The docker image then created data into that volume, wherever it may be. The data is accessible on every docker run.
  
  If I then create that missing host directory and re-run the container, the new host folder is used, creating new data. When I remove it again, the old data shows up again.
  
  I have done `docker volume prune` and have nothing coming up with `docker volume ls`.
  
  When I remove the host directory again, then also remove the container and the image, then re-run the docker container, I can see the image getting re-downloaded, but then the old data is still there.
  
  How do I identify the location of the old data and interact with it?
  
  (This is on MacOS)
  
  **Tags:** docker, volume, macos
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-06-09. Score: 1
  
  I have been using Linux and since Docker volume caches the data, it is merely persistent until you remove it manually. In RHEL8, /var/lib/docker/volumes/, this is where all the volume mounts are stored. You can check if the same directory exists in MacOS. I haven't use Mac but I hope this helps.
  
  
  ---
  
  