title: Why docker-compose creates directories/files with user:group 999:999?
body: <p>I used <code>docker-compose up</code> with the following <code>docker-compose.yml</code></p>
  
  <pre><code>version: '3.5'
  services:
   mysql-server:
    image: mysql:5.7
    environment:
      - MYSQL_ROOT_PASSWORD=root_pwd
    volumes:
     - ./var/lib/mysql:/var/lib/mysql:rw
  </code></pre>
  
  <p>The directory <code>./var/lib/mysql</code> does not exist initially. </p>
  
  <p>After running <code>docker-compose up</code> .. </p>
  
  <p><code>ls -al ./var/lib/mysql</code> command shows all the files with <code>user:group</code> <code>999:999</code>. </p>
  
  <p>I cannot find user or group called <code>999</code> in my system. </p>
  
  <p><strong>Why</strong> <code>docker-compose</code> chooses to <strong>create files</strong> with a <strong>non-existing uid:gid</strong> ?</p>
  
  <p>In my case, I cannot commit the specific directory unless I change ownership. But even when I do, on a next run, <code>docker-compose up</code> updates the ownership again to <code>999:999</code>.</p>
  
  <p>What is the solution to the above problem? e.g. Is there a way to instruct docker-compose to map files in host machine with a specific uid:gid pair?</p>
  
  <p>Host: ubuntu-18.04<br>
  docker-compose: 1.22.0</p>