title: How to make symbolic links point to files inside a docker container when mounting a directory
body: <p>I have created a symbolic link to a file on a host machine. Then I have mounted a directory which contains the file and the link to a docker container. I expect the link inside the container to point to the file inside the container. However it points to the file on host, so it is broken inside the container. Is there a way to make all the links inside a container point to files inside a container and links on host point to files on host? Note that I wouldn't like to modify the links itself.</p>
  <p>An example:</p>
  <pre><code>cd /home/myuser/work/tmp
  touch a.txt
  ln -s &quot;$(pwd)&quot;/a.txt b.link
  docker run -it -v &quot;$(pwd)&quot;:/some ubuntu bash
  ls -lah /some/b.link
  lrwxrwxrwx 1 1010 1014 30 Mar 10 13:45 /some/b.link -&gt; /home/myuser/work/tmp/a.txt
  </code></pre>
  <p>Expected output:</p>
  <pre><code>lrwxrwxrwx 1 1010 1014 30 Mar 10 13:45 /some/b.link -&gt; /some/a.txt
  </code></pre>