title: How to copy files inside container with docker-compose
body: <p>I have a simple image that runs a jar file. That jar file inside the image needs a special configuration file in order to run.</p>
  <p>In the location with the docker-compose.yml I have a folder named &quot;carrier&quot; and under this folder I have that file.</p>
  <p>The docker-compose.yml:</p>
  <pre><code>version: &quot;3.3&quot;
  services:
      web:
          image: &quot;myimage:1.80.0.0&quot;
          ports:
              - &quot;61003:61003&quot;
          volumes:
              - ./carrier:/var/local/Config/
      
  </code></pre>
  <p>When I hit <code>docker-compose up</code> it complains that the file is not there, so it doesn't copy it.
  If I do another option like I did in the .sh command, something like this:</p>
  <pre><code>       volumes:
              - ./carrier:/var/local/Config/:shared
  </code></pre>
  <p>It complains about another error:</p>
  <pre><code>C:\Tasks\2246&gt;docker-compose up
  Removing 2246_web_1
  Recreating 1fbf5d2bcea4_2246_web_1 ... error
  
  ERROR: for 1fbf5d2bcea4_2246_web_1  Cannot start service web: path /host_mnt/c/Tasks/2246/carrier is mounted on / but it is not a shared mount
          
  </code></pre>
  <p>Can someone please help me?</p>