title: Symlink lost within Docker image
body: <p>I am defining a Dockerfile where I install <code>sqlite3</code> in a <code>ubuntu</code> based image, something very similar (I also install grpc and rust as well as all the necessary dependencies) to:</p>
  
  <pre><code>FROM ubuntu
  
  RUN apt-get update &amp;&amp; \
      apt-get install -y sqlite3 libsqlite3-dev&amp;&amp; \
      apt-get clean &amp;&amp; \
      apt-get autoremove
  </code></pre>
  
  <p>I use this image to built my Rust project within it. The issue that I am facing is that <code>cargo build</code> fails on my GitLab CI due to a linking issue:</p>
  
  <pre><code>Compiling migrations_macros v1.4.0
  error: linking with `cc` failed: exit code: 1
  ...
  = note: /usr/bin/ld: cannot find -lsqlite3
  </code></pre>
  
  <p>I found out that this is due to this symlink not being present on the Docker image that is running on CI:</p>
  
  <pre><code>libsqlite3.so -&gt; /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
  </code></pre>
  
  <p>while the file <code>libsqlite3.so.0.8.6</code> exists. So if I create the symlink during the CI jobs I can have a working workaround. The weird thing is that if I pull the same exact image from my registry on my pc and run the container I can build without any issue and any change because the symlink is actually there.</p>
  
  <p>What could be the cause of the problem and how to solve it?</p>