title: How to set uid and gid in Docker Compose?
body: <p>I can execute a <code>docker run</code> command as such ... </p>
  
  <pre><code>docker run --rm  --user $(id -u):$(id -g) -e MYDATA=/some/path/to/data -e USER=$USER -p 8883-8887:8883-8887 ...
  </code></pre>
  
  <p>However, in Docker Compose, when I write out the following ... </p>
  
  <pre><code>version: '3.7'
  services:
    container_name: some-server
    image: some:img
    user: $(id -u):$(id -g) 
    ... 
  </code></pre>
  
  <p>... it does not work. </p>
  
  <p>I understand I am asking <code>docker-compose up</code> to perform sub shell command substitution, and it cannot. </p>
  
  <p>Is there any way to do this? </p>